x11: don't try and close a NULL display
If we failed to open an X display then don't later try and close a NULL display resulting in a crash.
This commit is contained in:
parent
8b34a39319
commit
1144a05bfd
@ -181,7 +181,7 @@ _cogl_xlib_renderer_disconnect (CoglRenderer *renderer)
|
|||||||
{
|
{
|
||||||
CoglXlibRenderer *xlib_renderer = renderer->winsys;
|
CoglXlibRenderer *xlib_renderer = renderer->winsys;
|
||||||
|
|
||||||
if (!renderer->foreign_xdpy)
|
if (!renderer->foreign_xdpy && xlib_renderer->xdpy)
|
||||||
XCloseDisplay (xlib_renderer->xdpy);
|
XCloseDisplay (xlib_renderer->xdpy);
|
||||||
|
|
||||||
unregister_xlib_renderer (renderer);
|
unregister_xlib_renderer (renderer);
|
||||||
|
Loading…
Reference in New Issue
Block a user