[rkward-cvs] SF.net SVN: rkward: [1914] trunk/rkward/rkward/windows/rkworkplace.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri May 18 13:58:16 UTC 2007


Revision: 1914
          http://svn.sourceforge.net/rkward/?rev=1914&view=rev
Author:   tfry
Date:     2007-05-18 06:58:16 -0700 (Fri, 18 May 2007)

Log Message:
-----------
Fix potential crash while closing windows

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkworkplace.cpp

Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp	2007-05-18 13:37:52 UTC (rev 1913)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp	2007-05-18 13:58:16 UTC (rev 1914)
@@ -321,8 +321,8 @@
 	// WARNING: the window is dead. Don't call any functions on it.
 
 	RK_ASSERT (windows.find (window) != windows.end ());
+	windows.remove (window);		// do this first! view()->removePage will call activePage() indirectly from setCaption, causing us to iterate over all known windows!
 	if (view ()->hasPage (window)) view ()->removePage (window, true);
-	windows.remove (window);
 
 	windowRemoved ();
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list