File p_twm_sig11.diff of Package xorg-x11

Index: programs/twm/add_window.c
===================================================================
RCS file: /work/cvsdir/cvs/xc/programs/twm/add_window.c,v
retrieving revision 1.1.1.10
diff -u -r1.1.1.10 add_window.c
--- programs/twm/add_window.c	27 Apr 2005 15:56:32 -0000	1.1.1.10
+++ programs/twm/add_window.c	1 Mar 2006 10:59:44 -0000
@@ -1538,10 +1538,11 @@
 
 	cwins = (ColormapWindow **) malloc(sizeof(ColormapWindow *));
 	if (XFindContext(dpy, tmp->w, ColormapContext, (caddr_t *)&cwins[0]) ==
-		XCNOENT)
+	    XCNOENT) {
 	    cwins[0] = CreateColormapWindow(tmp->w,
 			    (Bool) tmp->cmaps.number_cwins == 0, False);
-	else
+	    if (cwins[0] == NULL) number_cmap_windows = 0;
+	} else
 	    cwins[0]->refcnt++;
     }
 
openSUSE Build Service is sponsored by