mail[Wesnoth-commits] r44609 - /trunk/src/whiteboard/manager.cpp


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

Header


Content

Posted by gabrielmorin on July 24, 2010 - 07:06:
Author: gabba
Date: Sat Jul 24 07:05:59 2010
New Revision: 44609

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44609&view=rev
Log:
Whiteboard: Attempt 1 at fixing deque iterator crash under windows.

Modified:
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=44609&r1=44608&r2=44609&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Sat Jul 24 07:05:59 2010
@@ -550,8 +550,11 @@
 
 bool manager::unit_has_actions(const unit& unit) const
 {
-       return viewer_actions()->find_first_action_of(unit)
-                       != viewer_actions()->end();
+       if (viewer_actions()->empty())
+               return false;
+       else
+               return viewer_actions()->find_first_action_of(unit)
+                               != viewer_actions()->end();
 }
 
 void manager::fake_unit_deleter::operator() (unit*& fake_unit)




Related Messages


Powered by MHonArc, Updated Sat Jul 24 07:20:13 2010