Fix issue detected by static analysis tool 16/262916/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 23 Aug 2021 11:31:39 +0000 (20:31 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 23 Aug 2021 11:31:41 +0000 (20:31 +0900)
Return value of a function 'scl::CSCLUIBuilder::get_instance' is dereferenced
at sclwindows-efl.cpp:1009 without checking, but it is usually checked for this function

Change-Id: I2d5ff1f349d6d6f049a1c3856c767863c8468f92
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
scl/sclwindows-efl.cpp

index 9871aa5..0ea1afc 100644 (file)
@@ -1006,7 +1006,8 @@ CSCLWindowsImplEfl::update_window(const sclwindow window, scl16 x, scl16 y, scl1
             window_context->etc_info = NULL;*/
         }
         CSCLUIBuilder *builder = CSCLUIBuilder::get_instance();
-        builder->show_layout(window, x, y, width, height);
+        if (builder)
+            builder->show_layout(window, x, y, width, height);
     }
 
     /*evas_image_cache_flush(evas_object_evas_get((Evas_Object*)window));