From: Daehyeon Jung Date: Wed, 30 Mar 2016 12:10:11 +0000 (+0900) Subject: Add NULL check for endpoint X-Git-Tag: accepted/tizen/common/20160331.051246^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=013d5c1e938cd23dbeed7bbf019f634d7ec5c506;p=platform%2Fcore%2Fappfw%2Fappcore-widget.git Add NULL check for endpoint Change-Id: I3d1819d9f30784c785fd680593b5e9cb1c4cc65f --- diff --git a/src/widget_app.c b/src/widget_app.c index b856c16..f515704 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -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);