diff options
author | Strangerke | 2014-08-03 10:32:28 +0200 |
---|---|---|
committer | Strangerke | 2014-08-03 10:33:37 +0200 |
commit | 6558581d68c740d380e695cb9c150c81fc082bb8 (patch) | |
tree | 3f1aa29c0793ebc5a83456fa2732a9c839c206e5 /engines/cge2/vmenu.cpp | |
parent | 2b60bb9cc376f9e8e7866f07cb2012a6bf748914 (diff) | |
download | scummvm-rg350-6558581d68c740d380e695cb9c150c81fc082bb8.tar.gz scummvm-rg350-6558581d68c740d380e695cb9c150c81fc082bb8.tar.bz2 scummvm-rg350-6558581d68c740d380e695cb9c150c81fc082bb8.zip |
CGE2: Remove more checks on the return value of new
Diffstat (limited to 'engines/cge2/vmenu.cpp')
-rw-r--r-- | engines/cge2/vmenu.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/cge2/vmenu.cpp b/engines/cge2/vmenu.cpp index fa4c29c1d7..a84078f7a6 100644 --- a/engines/cge2/vmenu.cpp +++ b/engines/cge2/vmenu.cpp @@ -100,15 +100,14 @@ char *VMenu::vmGather(Common::Array<Choice *> list) { ++h; } _vmgt = new char[len + h]; - if (_vmgt) { - *_vmgt = '\0'; - for (uint i = 0; i < list.size(); i++) { - if (*_vmgt) - strcat(_vmgt, "|"); - strcat(_vmgt, list[i]->_text); - ++h; - } + *_vmgt = '\0'; + for (uint i = 0; i < list.size(); i++) { + if (*_vmgt) + strcat(_vmgt, "|"); + strcat(_vmgt, list[i]->_text); + ++h; } + return _vmgt; } |