d2d-conv-manager: fix svace_2.2 issue 18/105318/1 accepted/tizen/common/20161219.151911 accepted/tizen/mobile/20161219.021959 accepted/tizen/tv/20161219.022027 accepted/tizen/wearable/20161219.022037 submit/tizen/20161219.005545
authorHongkuk, Son <hongkuk.son@samsung.com>
Fri, 16 Dec 2016 07:56:48 +0000 (16:56 +0900)
committerHongkuk Son <hongkuk.son@samsung.com>
Fri, 16 Dec 2016 08:13:51 +0000 (00:13 -0800)
DEREF_AFTER_NULL.EX

Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: I0637c8e8f5b14f6554f4aff121acad0a16bfe7e5

msf_tizen_client/src/Channel.cpp

index 5eab686..286afbc 100755 (executable)
@@ -1204,7 +1204,9 @@ unsigned char *Channel::prepareMessageMap(string method, string event,
                Json::Value params;
 
                params["event"] = event;
-               params["data"] = data;
+               if (data) {
+                       params["data"] = data;
+               }
                params["to"] = to;
                message["method"] = method;
                message["params"] = params;
@@ -1234,7 +1236,9 @@ unsigned char *Channel::prepareMessageMap(string method, string event,
                Json::Value params;
 
                params["event"] = event;
-               params["data"] = data;
+               if (data) {
+                       params["data"] = data;
+               }
                params["to"] = to;
                message["method"] = method;
                message["params"] = params;