From 37f27d59cd32afcdaab4d5eb079ca4a8f17f4721 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 8 Sep 2011 04:46:06 -0700 Subject: [PATCH] xserver: check whether pointer exists when exiting At initialization, if it fails in binding the socket or creating the lock file then the pointer will be already freed and will result a segfault when quiting the compositor. Signed-off-by: Tiago Vignatti --- compositor/xserver-launcher.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compositor/xserver-launcher.c b/compositor/xserver-launcher.c index e0b2ec6..81d70ce 100644 --- a/compositor/xserver-launcher.c +++ b/compositor/xserver-launcher.c @@ -808,6 +808,9 @@ wlsc_xserver_destroy(struct wlsc_compositor *compositor) { struct wlsc_xserver *wxs = compositor->wxs; + if (!wxs) + return; + if (wxs->loop) wlsc_xserver_shutdown(wxs); -- 2.7.4