summaryrefslogtreecommitdiff
path: root/libs/libjson/src/internalJSONNode.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-01 20:11:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-01 20:11:44 +0300
commitd2d633a1667ea16c9c88eae9d679c91c545a77ee (patch)
tree54b712a6ce2ebfdf30a83e7705814b69fd498428 /libs/libjson/src/internalJSONNode.h
parenta85c40a54d9036c98aed37071500df5926e74028 (diff)
fix for null avatar hash processing
Diffstat (limited to 'libs/libjson/src/internalJSONNode.h')
-rw-r--r--libs/libjson/src/internalJSONNode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/libjson/src/internalJSONNode.h b/libs/libjson/src/internalJSONNode.h
index c77e502543..26e279764e 100644
--- a/libs/libjson/src/internalJSONNode.h
+++ b/libs/libjson/src/internalJSONNode.h
@@ -285,11 +285,15 @@ inline void internalJSONNode::setname(const json_string & newname){
inline json_string internalJSONNode::as_string(void) const {
Fetch();
+ if (_type == JSON_NULL)
+ return json_string();
return _string;
}
inline CMStringW internalJSONNode::as_mstring(void) const {
Fetch();
+ if (_type == JSON_NULL)
+ return CMStringW();
return CMStringW(ptrW(mir_utf8decodeW(_string.c_str())));
}