diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-15 15:42:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-15 15:42:04 +0300 |
commit | e7c55a0055f63c12ccaf1bf62056462fe055b94a (patch) | |
tree | fb15f14ff0e26e17bd126a4838a1631a8d118d0d /libs/libjson | |
parent | f63aedb11c41ab45907d779db5d18c2319d2c8a3 (diff) |
fix for a possible crash
Diffstat (limited to 'libs/libjson')
-rw-r--r-- | libs/libjson/src/libJSON.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/libjson/src/libJSON.cpp b/libs/libjson/src/libJSON.cpp index 9844a0e525..6969ebd38d 100644 --- a/libs/libjson/src/libJSON.cpp +++ b/libs/libjson/src/libJSON.cpp @@ -90,6 +90,9 @@ LIBJSON_DLL(void) json_delete(JSONNode *node) { JSONNode JSONNode::parse(const json_char *str)
{
+ if (str == nullptr)
+ return JSONNode();
+
return JSONWorker::parse(str);
}
|