From: <tz...@us...> - 2008-06-29 20:09:13
|
Revision: 2615 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=2615&view=rev Author: tzlaine Date: 2008-06-29 13:09:20 -0700 (Sun, 29 Jun 2008) Log Message: ----------- Fixed a crash bug in TechTreeWnd::TechListBox::Populate() due to incorrect use of GG::ListBox::reverse_iterators. Modified Paths: -------------- trunk/FreeOrion/UI/TechTreeWnd.cpp Modified: trunk/FreeOrion/UI/TechTreeWnd.cpp =================================================================== --- trunk/FreeOrion/UI/TechTreeWnd.cpp 2008-06-29 19:27:05 UTC (rev 2614) +++ trunk/FreeOrion/UI/TechTreeWnd.cpp 2008-06-29 20:09:20 UTC (rev 2615) @@ -2337,8 +2337,9 @@ } // remove techs in listbox, then reset the rest of its state - for (reverse_iterator it = rbegin(); it != rend(); ) { - Erase((++it).base()); + for (iterator it = begin(); it != end(); ) { + iterator temp_it = it++; + Erase(temp_it); } Clear(); |