summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@intel.com>2011-09-08 04:46:06 -0700
committerKristian Høgsberg <krh@bitplanet.net>2011-09-08 18:28:13 -0400
commitb31ad73f9df21f428efd8f372ddb70fc26799b47 (patch)
tree237857e3618f36a2c8b92ff6f25995ab0572f948
parent0e46e2b300874e28fe8f815500e4c3422c022d72 (diff)
xserver: check whether pointer exists when exitingwayland-demos-0.8
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 <tiago.vignatti@intel.com>
-rw-r--r--compositor/xserver-launcher.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compositor/xserver-launcher.c b/compositor/xserver-launcher.c
index 254f7c5..5de6a0e 100644
--- a/compositor/xserver-launcher.c
+++ b/compositor/xserver-launcher.c
@@ -815,6 +815,9 @@ wlsc_xserver_destroy(struct wlsc_compositor *compositor)
{
struct wlsc_xserver *wxs = compositor->wxs;
+ if (!wxs)
+ return;
+
if (wxs->loop)
wlsc_xserver_shutdown(wxs);