[MPlayer-cvslog] r35448 - trunk/gui/wm/ws.c

ib subversion at mplayerhq.hu
Fri Nov 23 10:02:23 CET 2012


Author: ib
Date: Fri Nov 23 10:02:22 2012
New Revision: 35448

Log:
Check array index.

Make sure that the window we are destroying is in our wsWindowList.

Modified:
   trunk/gui/wm/ws.c

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Nov 22 15:32:37 2012	(r35447)
+++ trunk/gui/wm/ws.c	Fri Nov 23 10:02:22 2012	(r35448)
@@ -615,7 +615,9 @@ void wsDestroyWindow(wsTWindow *win)
     int l;
 
     l = wsSearch(win->WindowID);
-    wsWindowList[l] = NULL;
+
+    if (l != -1)
+        wsWindowList[l] = NULL;
 
     if (win->wsCursor != None) {
         XFreeCursor(wsDisplay, win->wsCursor);


More information about the MPlayer-cvslog mailing list