[gtk+] Don't set the default display to NULL



commit bb7662392d68bb504c46eb6c957e2dc5031932c4
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 18 09:36:59 2011 -0500

    Don't set the default display to NULL
    
    This was causing segfaults if DISPLAY is unset

 gdk/x11/gdkdisplaymanager-x11.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdisplaymanager-x11.c b/gdk/x11/gdkdisplaymanager-x11.c
index dd712d9..fbd4946 100644
--- a/gdk/x11/gdkdisplaymanager-x11.c
+++ b/gdk/x11/gdkdisplaymanager-x11.c
@@ -53,7 +53,7 @@ gdk_x11_display_manager_open_display (GdkDisplayManager *manager,
   GdkDisplay *display;
 
   display = _gdk_x11_display_open (name);
-  if (manager_x11->default_display == NULL)
+  if (manager_x11->default_display == NULL && display != NULL)
     gdk_display_manager_set_default_display (manager, display);
 
   return display;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]