[cogl/wip/release-1.7.4: 1/7] x11: don't try and close a NULL display
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/release-1.7.4: 1/7] x11: don't try and close a NULL display
- Date: Wed, 20 Jul 2011 15:45:25 +0000 (UTC)
commit 1144a05bfd57e925ef4280b7c0272cb2aed34689
Author: Robert Bragg <robert linux intel com>
Date: Tue Jul 19 19:46:37 2011 +0100
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.
cogl/cogl-xlib-renderer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-xlib-renderer.c b/cogl/cogl-xlib-renderer.c
index 03a822b..8b4d3cc 100644
--- a/cogl/cogl-xlib-renderer.c
+++ b/cogl/cogl-xlib-renderer.c
@@ -181,7 +181,7 @@ _cogl_xlib_renderer_disconnect (CoglRenderer *renderer)
{
CoglXlibRenderer *xlib_renderer = renderer->winsys;
- if (!renderer->foreign_xdpy)
+ if (!renderer->foreign_xdpy && xlib_renderer->xdpy)
XCloseDisplay (xlib_renderer->xdpy);
unregister_xlib_renderer (renderer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]