1
0
Fork 0

Fix null pointer dereference introduced by 8aec4a0cef

This commit is contained in:
Florent Rougon 2017-01-06 13:07:00 +01:00
parent 7618cbffc2
commit d762db2db8

View file

@ -1870,11 +1870,11 @@ public:
cJSON *createJSONArrayFromPathList(const PathList& pl) const
{
cJSON *resultNode = cJSON_CreateArray();
cJSON *prevNode = nullptr;
bool isFirst = true;
for (const SGPath& path : pl) {
cJSON *pathNode = cJSON_CreateString(path.utf8Str().c_str());
cJSON *prevNode = nullptr;
if (isFirst) {
isFirst = false;