[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src actions.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src actions.cpp |
Date: |
Wed, 29 Dec 2004 14:34:01 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 04/12/29 19:22:13
Modified files:
src : actions.cpp
Log message:
attempt to fix assertion failure in move_unit()
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.173&tr2=1.174&r1=text&r2=text
Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.173 wesnoth/src/actions.cpp:1.174
--- wesnoth/src/actions.cpp:1.173 Fri Dec 17 12:45:43 2004
+++ wesnoth/src/actions.cpp Wed Dec 29 19:22:13 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.173 2004/12/17 12:45:43 Sirp Exp $ */
+/* $Id: actions.cpp,v 1.174 2004/12/29 19:22:13 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1574,12 +1574,14 @@
std::vector<gamemap::location> route,
replay* move_recorder, undo_list* undo_stack,
gamemap::location *next_unit, bool continue_move, bool
should_clear_shroud)
-{
+{
+ if(route.empty()) {
+ return 0;
+ }
+
//stop the user from issuing any commands while the unit is moving
const command_disabler disable_commands;
- assert(!route.empty());
-
unit_map::iterator ui = units.find(route.front());
assert(ui != units.end());