Fix null pointer dereference introduced by 8aec4a0cef
This commit is contained in:
parent
7618cbffc2
commit
d762db2db8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue