From: Ismo Puustinen Date: Wed, 29 Jan 2014 13:14:31 +0000 (+0200) Subject: system-controller: do not use destroyed display. X-Git-Tag: accepted/tizen/ivi/20150112.012920~279 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=523ebc01a036a0f1123cf4861b415b803312f8fe;p=profile%2Fivi%2Fmurphy.git system-controller: do not use destroyed display. Change-Id: I30d4cf6498009cee9dad7c65e0e434b7681f2a82 --- diff --git a/src/plugins/system-controller/wayland/wayland.c b/src/plugins/system-controller/wayland/wayland.c index 965cffe..73ef68e 100644 --- a/src/plugins/system-controller/wayland/wayland.c +++ b/src/plugins/system-controller/wayland/wayland.c @@ -458,12 +458,18 @@ static void display_io_watch(mrp_io_watch_t *iow, MRP_ASSERT(wl, "invalid user data"); MRP_ASSERT(iow == wl->iow, "mismatching io watch"); + if (!wl->display) + return; + if ((events & MRP_IO_EVENT_HUP)) { mrp_log_info("display '%s' is gone", get_display_name(wl)); wl_registry_destroy(wl->registry); wl_display_disconnect(wl->display); + wl->registry = NULL; + wl->display = NULL; + return; }