From: Jihoon Chung Date: Wed, 15 May 2013 07:07:36 +0000 (+0900) Subject: Add exception case of NULL for ipc between plugin and UI Process X-Git-Tag: submit/tizen_2.2/20130927.091410^2~58 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fweb%2Fwrt-plugins-common.git;a=commitdiff_plain;h=32f9284ca1370998d1e6159661ab95e4bcca91d7 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 --- diff --git a/src/plugins-ipc-message/ipc_message_support.cpp b/src/plugins-ipc-message/ipc_message_support.cpp index db1e8a8..5f9892d 100644 --- a/src/plugins-ipc-message/ipc_message_support.cpp +++ b/src/plugins-ipc-message/ipc_message_support.cpp @@ -79,8 +79,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; }