Module Name:    xsrc
Committed By:   christos
Date:           Sat Sep  5 14:14:24 UTC 2015

Modified Files:
        xsrc/external/mit/ctwm/dist: workmgr.c

Log Message:
CID 1322889: Missing check for NULL


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/ctwm/dist/workmgr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/ctwm/dist/workmgr.c
diff -u xsrc/external/mit/ctwm/dist/workmgr.c:1.1 xsrc/external/mit/ctwm/dist/workmgr.c:1.2
--- xsrc/external/mit/ctwm/dist/workmgr.c:1.1	Thu Sep  3 18:16:33 2015
+++ xsrc/external/mit/ctwm/dist/workmgr.c	Sat Sep  5 10:14:24 2015
@@ -1340,7 +1340,7 @@ static void DisplayWin (virtualScreen *v
 	if (tmp_win->isicon) {
 	    if (tmp_win->icon_on) {
 		if (tmp_win->icon && tmp_win->icon->w) {
-		    if (vs != tmp_win->old_parent_vs) {
+		    if (vs && vs != tmp_win->old_parent_vs) {
 			int x, y;
 			unsigned int junk;
 			Window junkW, w = tmp_win->icon->w;
@@ -1370,7 +1370,7 @@ static void DisplayWin (virtualScreen *v
 	    XMapWindow   (dpy, tmp_win->w);
 	    XSelectInput (dpy, tmp_win->w, eventMask);
 	}
-	if (vs != tmp_win->old_parent_vs) {
+	if (vs && vs != tmp_win->old_parent_vs) {
 	    XReparentWindow (dpy, tmp_win->frame, vs->window, tmp_win->frame_x, tmp_win->frame_y);
 	}
 	XMapWindow (dpy, tmp_win->frame);

Reply via email to