# HG changeset patch # User ib # Date 1353661342 0 # Node ID 2ce3d21157ed6d4e9ec8588f53c425322a8b5318 # Parent d59cf5c869f4fdfd89e718acdc72ecdf3d17c1e6 Check array index. Make sure that the window we are destroying is in our wsWindowList. diff -r d59cf5c869f4 -r 2ce3d21157ed gui/wm/ws.c --- 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);