Add exception case of NULL for ipc between plugin and UI Process 08/10208/1
authorJihoon Chung <jihoon.chung@samsung.com>
Wed, 15 May 2013 07:07:36 +0000 (16:07 +0900)
committerSoo-Hyun Choi <sh9.choi@samsung.com>
Tue, 24 Sep 2013 12:42:09 +0000 (21:42 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Add exception case of NULL is returned from UI Process
In this case, simple pass NULL to plugin
[SCMRequest] N/A

Change-Id: Id907799a98b48c116511765dfb87c584d4fd3045

src/plugins-ipc-message/ipc_message_support.cpp

index 3a50859..fa36f8d 100644 (file)
@@ -100,8 +100,12 @@ const char* IPCMessageSupport::sendMessageToUiProcess(
     if (bodyWKString) {
         WKRelease(bodyWKString);
     }
-    std::string retString = toString(static_cast<WKStringRef>(retWKType));
-    WKRelease(retWKType);
-
-    return strdup(retString.c_str());
+    if (retWKType) {
+        std::string retString = toString(static_cast<WKStringRef>(retWKType));
+        WKRelease(retWKType);
+        return strdup(retString.c_str());
+    } else {
+        return NULL;
+    }
+    return NULL;
 }