From 013d5c1e938cd23dbeed7bbf019f634d7ec5c506 Mon Sep 17 00:00:00 2001 From: Daehyeon Jung Date: Wed, 30 Mar 2016 21:10:11 +0900 Subject: [PATCH] Add NULL check for endpoint Change-Id: I3d1819d9f30784c785fd680593b5e9cb1c4cc65f --- src/widget_app.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.7.4