Add NULL check for endpoint 10/64210/1 accepted/tizen/common/20160331.051246 accepted/tizen/ivi/20160330.134633 accepted/tizen/mobile/20160330.134529 accepted/tizen/tv/20160330.134548 accepted/tizen/wearable/20160330.134610 submit/tizen/20160330.120402
authorDaehyeon Jung <darrenh.jung@samsung.com>
Wed, 30 Mar 2016 12:10:11 +0000 (21:10 +0900)
committerDaehyeon Jung <darrenh.jung@samsung.com>
Wed, 30 Mar 2016 12:10:11 +0000 (21:10 +0900)
Change-Id: I3d1819d9f30784c785fd680593b5e9cb1c4cc65f

src/widget_app.c

index b856c16..f515704 100755 (executable)
@@ -336,8 +336,12 @@ static int __before_loop(int argc, char **argv)
                bundle_get_str(kb, AUL_K_WAYLAND_WORKING_DIR, &xdg_runtime_dir);
                bundle_get_str(kb, AUL_K_WAYLAND_DISPLAY, &wayland_display);
                bundle_get_str(kb, WIDGET_K_ENDPOINT, &viewer_endpoint);
-               _E("viewer endpoint :%s", viewer_endpoint);
-               viewer_endpoint = strdup(viewer_endpoint);
+               if (viewer_endpoint) {
+                       _E("viewer endpoint :%s", viewer_endpoint);
+                       viewer_endpoint = strdup(viewer_endpoint);
+               } else {
+                       _E("endpoint is missing");
+               }
 
                if (xdg_runtime_dir)
                        setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1);