From: Daehyeon Jung Date: Fri, 17 Jun 2016 05:22:16 +0000 (+0900) Subject: fix dereference wrong ptr and uninitialized val X-Git-Tag: accepted/tizen/common/20160617.121820^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F75208%2F2;p=platform%2Fcore%2Fappfw%2Fappcore-widget.git fix dereference wrong ptr and uninitialized val Change-Id: Ib47aaf212970c533912ac2cd08f7a7324ce5897f --- diff --git a/src/widget_app.c b/src/widget_app.c index c8e3764..ba14ac9 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -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);