From d762db2db8db66173f2129034393e73065a9c07b Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 6 Jan 2017 13:07:00 +0100 Subject: [PATCH] Fix null pointer dereference introduced by 8aec4a0cef --- src/Main/options.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 96a6fb538..a9aa034b1 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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;