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 <tiago.vignatti@intel.com>
This commit is contained in:
Tiago Vignatti 2011-09-08 04:46:06 -07:00 committed by Kristian Høgsberg
parent 7e69000556
commit 37f27d59cd
1 changed files with 3 additions and 0 deletions

View File

@ -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);