summaryrefslogtreecommitdiff
path: root/libs/libjson/src/libJSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libjson/src/libJSON.cpp')
-rw-r--r--libs/libjson/src/libJSON.cpp3
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);
}