From 6558581d68c740d380e695cb9c150c81fc082bb8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 3 Aug 2014 10:32:28 +0200 Subject: CGE2: Remove more checks on the return value of new --- engines/cge2/vmenu.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'engines/cge2/vmenu.cpp') 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 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; } -- cgit v1.2.3