diff gui/wm/ws.c @ 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 b03481253518
children c8478a499a17
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);