Check return value
[platform/core/uifw/inputdelegator.git] / src / w-input-emoticon.cpp
index 8ffd747..6c5c902 100755 (executable)
@@ -373,13 +373,14 @@ void set_recent_emoticons(vector <int> &emoticon_list, int val)
 static void _drawing_app_control_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
 {
     char* path = NULL;
-    app_control_get_extra_data(reply, APP_CONTROL_DATA_PATH, &path);
-
-    if (path){
-        PRINTFUNC(DLOG_DEBUG, "path=%s", path);
-        char *pathes[] = {path, };
-        reply_to_sender_by_callback(NULL, "image", (const char **)pathes, NULL);
-        free(path);
+    int ret = app_control_get_extra_data(reply, APP_CONTROL_DATA_PATH, &path);
+    if (ret == APP_CONTROL_ERROR_NONE) {
+        if (path){
+            PRINTFUNC(DLOG_DEBUG, "path=%s", path);
+            char *pathes[] = {path, };
+            reply_to_sender_by_callback(NULL, "image", (const char **)pathes, NULL);
+            free(path);
+        }
     }
     ui_app_exit();
 }