fix dereference wrong ptr and uninitialized val 08/75208/2 accepted/tizen/common/20160617.121820 accepted/tizen/ivi/20160620.024811 accepted/tizen/mobile/20160620.024722 accepted/tizen/tv/20160620.024738 accepted/tizen/wearable/20160620.024754 submit/tizen/20160617.070610
authorDaehyeon Jung <darrenh.jung@samsung.com>
Fri, 17 Jun 2016 05:22:16 +0000 (14:22 +0900)
committerDaehyeon Jung <darrenh.jung@samsung.com>
Fri, 17 Jun 2016 05:24:56 +0000 (14:24 +0900)
Change-Id: Ib47aaf212970c533912ac2cd08f7a7324ce5897f

src/widget_app.c

index c8e3764..ba14ac9 100755 (executable)
@@ -326,7 +326,7 @@ static int __instance_resize(widget_class_h handle, const char *id, int w, int h
 static int __instance_update(widget_class_h handle, const char *id, bundle *b)
 {
        widget_context_s *wc = __find_context_by_id(id);
-       int ret;
+       int ret = 0;
        int force;
        char *force_str = NULL;
 
@@ -445,6 +445,11 @@ static void __resize_window(char *id, bundle *b)
        int w;
        int h;
 
+       if (!wc) {
+               _E("can not find instance: %s", id);
+               return;
+       }
+
        bundle_get_str(b, WIDGET_K_WIDTH, &w_str);
        bundle_get_str(b, WIDGET_K_HEIGHT, &h_str);