Initialise nxvisuals to 0 in order to handle XGetVisualInfo() failures

2007-03-17  Chris Wilson  <chris@chris-wilson.co.uk>

	* gdk/x11/gdkvisual-x11.c (_gdk_visual_init):
		Initialise nxvisuals to 0 in order to handle
		XGetVisualInfo() failures gracefully. (#419171)


svn path=/trunk/; revision=17538
This commit is contained in:
Chris Wilson 2007-03-17 18:51:35 +00:00 committed by Chris Wilson
parent de74fffdc7
commit 95eea6558f
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-03-17 Chris Wilson <chris@chris-wilson.co.uk>
* gdk/x11/gdkvisual-x11.c (_gdk_visual_init):
Initialise nxvisuals to 0 in order to handle
XGetVisualInfo() failures gracefully. (#419171)
2007-03-17 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentaction.c (recent_chooser_set_property),

View File

@ -119,6 +119,7 @@ _gdk_visual_init (GdkScreen *screen)
g_return_if_fail (GDK_IS_SCREEN (screen));
screen_x11 = GDK_SCREEN_X11 (screen);
nxvisuals = 0;
visual_template.screen = screen_x11->screen_num;
visual_list = XGetVisualInfo (screen_x11->xdisplay, VisualScreenMask, &visual_template, &nxvisuals);