Add error handling for NULL 90/230090/1 accepted/tizen/unified/20200408.131455 submit/tizen/20200408.033020
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 Apr 2020 02:27:00 +0000 (11:27 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 Apr 2020 02:27:19 +0000 (11:27 +0900)
Change-Id: Ic8323552dfef9f5a6325404156fd5eec9477b493

ug-wifidirect/src/wfd_ug.c

index b8a1691..4db9230 100644 (file)
@@ -600,8 +600,13 @@ static void on_message(ui_gadget_h ug, app_control_h msg, app_control_h control,
 
        if (msg) {
                app_control_get_extra_data(msg, "msg", &app_msg);
-               DBG(LOG_DEBUG, "Msg from app: %s", app_msg);
+               if (!app_msg) {
+                       DBG(LOG_ERROR, "Failed to get app_msg");
+                       __FUNC_EXIT__;
+                       return;
+               }
 
+               DBG(LOG_DEBUG, "Msg from app: %s", app_msg);
                if (!strcmp(app_msg, "destroy")) {
                        if (!ugd->rename_popup) {
                                DBG(LOG_INFO, "Destroying UG.");