Fix static analysis issue 29/154429/2
authorJunghoon Park <jh9216.park@samsung.com>
Tue, 10 Oct 2017 07:48:20 +0000 (16:48 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 11 Oct 2017 00:45:40 +0000 (00:45 +0000)
- Fix 'Dereference null return value'

Change-Id: I5970c18cf171918ac141a812514904f9589f5de8
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/base/widget_base.c

index f37fa3f..bf5de25 100644 (file)
@@ -111,6 +111,12 @@ static gboolean __timeout_cb(gpointer user_data)
        const char *class_id;
 
        cxt = appcore_multiwindow_base_instance_find(data->id);
+
+       if (!cxt) {
+               LOGE("Can't find the instance");
+               return G_SOURCE_REMOVE;
+       }
+
        if (appcore_multiwindow_base_instance_is_resumed(cxt)) {
                LOGD("Periodic update!");
                class_id = appcore_multiwindow_base_instance_get_class_id(cxt);