From: José Fonseca Date: Tue, 11 Oct 2011 18:33:02 +0000 (+0100) Subject: Handle null strings in json writer. X-Git-Tag: 2.0_alpha^2~579 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02bf5b48c041ef6fb575953b911e4268a44a9a9f;p=tools%2Fapitrace.git Handle null strings in json writer. --- diff --git a/common/json.hpp b/common/json.hpp index 9e6b960..621610a 100644 --- a/common/json.hpp +++ b/common/json.hpp @@ -270,6 +270,11 @@ public: } inline void writeString(const char *s) { + if (!s) { + writeNull(); + return; + } + separator(); escapeUnicodeString(s); value = true;