changeset 35354:2ce3d21157ed

Check array index. Make sure that the window we are destroying is in our wsWindowList.
author ib
date Fri, 23 Nov 2012 09:02:22 +0000
parents d59cf5c869f4
children c8478a499a17
files gui/wm/ws.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/wm/ws.c	Thu Nov 22 14:32:37 2012 +0000
+++ b/gui/wm/ws.c	Fri Nov 23 09:02:22 2012 +0000
@@ -615,7 +615,9 @@
     int l;
 
     l = wsSearch(win->WindowID);
-    wsWindowList[l] = NULL;
+
+    if (l != -1)
+        wsWindowList[l] = NULL;
 
     if (win->wsCursor != None) {
         XFreeCursor(wsDisplay, win->wsCursor);