Fix crash in StringUtilities::cStringArrayToCppList() with NULL as argument

This commit is contained in:
François Grisez 2017-06-12 14:43:56 +02:00
parent 28e6664aae
commit df4cc8d707

View file

@ -73,8 +73,8 @@ const char *StringUtilities::cppStringToC(const std::string &cppstr) {
std::list<std::string> StringUtilities::cStringArrayToCppList(const char **cArray) {
list<string> cppList;
int i;
for(i=0; cArray[i]!=NULL; i++) {
if (cArray == NULL) return cppList;
for(int i=0; cArray[i]!=NULL; i++) {
cppList.push_back(cArray[i]);
}
return cppList;