From db8b66b4c684aa4fcb9d860f4bcbbaa4ca23f1e3 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Wed, 15 May 2013 16:07:36 +0900 Subject: [PATCH] Add exception case of NULL for ipc between plugin and UI Process [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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins-ipc-message/ipc_message_support.cpp b/src/plugins-ipc-message/ipc_message_support.cpp index 3a50859..fa36f8d 100644 --- a/src/plugins-ipc-message/ipc_message_support.cpp +++ b/src/plugins-ipc-message/ipc_message_support.cpp @@ -100,8 +100,12 @@ const char* IPCMessageSupport::sendMessageToUiProcess( if (bodyWKString) { WKRelease(bodyWKString); } - std::string retString = toString(static_cast(retWKType)); - WKRelease(retWKType); - - return strdup(retString.c_str()); + if (retWKType) { + std::string retString = toString(static_cast(retWKType)); + WKRelease(retWKType); + return strdup(retString.c_str()); + } else { + return NULL; + } + return NULL; } -- 2.7.4