Fix issue detected by static analysis tool 51/322751/1
authorInhong Han <inhong1.han@samsung.com>
Tue, 15 Apr 2025 09:39:25 +0000 (18:39 +0900)
committerInhong Han <inhong1.han@samsung.com>
Tue, 15 Apr 2025 09:39:25 +0000 (18:39 +0900)
Change-Id: If08ac81b013e45812a945f9d03b7d4a1fff92d82

src/w-input-emoticon.cpp

index 146e4b2dfe71a2d71cb9ff4fd8652a5eb56f3590..9971f26d98df8152af55d22199b40c2a74b98d31 100644 (file)
@@ -387,6 +387,7 @@ static void _drawing_app_control_reply_cb(app_control_h request, app_control_h r
 
 static void _drawing_item_clicked_cb(void *data, Evas_Object * obj, void *event_info)
 {
+    int ret;
     PRINTFUNC(DLOG_DEBUG, "%s", __func__);
     App_Data* ad = (App_Data*) data;
     if (!ad)
@@ -398,10 +399,20 @@ static void _drawing_item_clicked_cb(void *data, Evas_Object * obj, void *event_
 
     /* launch */
     app_control_h request = NULL;
-    app_control_create(&request);
-    app_control_set_app_id(request, "org.tizen.sketch");
+    ret = app_control_create(&request);
+    if (ret != APP_CONTROL_ERROR_NONE) {
+        PRINTFUNC(DLOG_DEBUG, "error code = 0x%x", ret);
+        return;
+    }
+
+    ret = app_control_set_app_id(request, "org.tizen.sketch");
+    if (ret != APP_CONTROL_ERROR_NONE) {
+        PRINTFUNC(DLOG_DEBUG, "error code = 0x%x", ret);
+        app_control_destroy(request);
+        return;
+    }
 
-    int ret = app_control_send_launch_request(request, _drawing_app_control_reply_cb, NULL);
+    ret = app_control_send_launch_request(request, _drawing_app_control_reply_cb, NULL);
     if (ret != APP_CONTROL_ERROR_NONE) {
         PRINTFUNC(DLOG_DEBUG, "error code = 0x%x", ret);
     }