mail[Wesnoth-commits] r43814 - /trunk/src/whiteboard/move.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on July 01, 2010 - 11:32:
Author: gabba
Date: Thu Jul  1 11:32:27 2010
New Revision: 43814

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43814&view=rev
Log:
Fixed crash on exit. Having the planned actions in teams can be problematic: 
this crash was caused by teams and therefore planned actions outliving the 
unit map.

Modified:
    trunk/src/whiteboard/move.cpp

Modified: trunk/src/whiteboard/move.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/move.cpp?rev=43814&r1=43813&r2=43814&view=diff
==============================================================================
--- trunk/src/whiteboard/move.cpp (original)
+++ trunk/src/whiteboard/move.cpp Thu Jul  1 11:32:27 2010
@@ -53,17 +53,16 @@
 
 move::~move()
 {
-       if (last_action_)
+       if (last_action_
+               && resources::units //FIXME: could tweak play_controller to 
ensure the unit map is still valid here
+               )
        {
                unit_.set_standing(true);
        }
 
-       if (resources::screen)
-       {
-               if (fake_unit_)
-               {
-                       
resources::screen->remove_temporary_unit(fake_unit_.get());
-               }
+       if (resources::screen && fake_unit_)
+       {
+               resources::screen->remove_temporary_unit(fake_unit_.get());
        }
 }
 




Related Messages


Powered by MHonArc, Updated Thu Jul 01 11:40:06 2010