Add exception case of NULL for ipc between plugin and UI Process
authorJihoon Chung <jihoon.chung@samsung.com>
Wed, 15 May 2013 07:07:36 +0000 (16:07 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Wed, 15 May 2013 07:27:55 +0000 (16:27 +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 db1e8a8..5f9892d 100644 (file)
@@ -79,8 +79,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;
 }