Author: crab
Date: Tue Apr 7 22:40:30 2009
New Revision: 34621
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34621&view=rev
Log:
fixed bug #13345 - recruitment code assumed that the leader is present and
still in the same place after WML events firing. Fix is not perfect (may skip
recruitment animation in some edge cases, where it would fail assert before),
but to make it better would require significally more code changes.
Modified:
trunk/src/actions.cpp
Modified: trunk/src/actions.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=34621&r1=34620&r2=34621&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Tue Apr 7 22:40:30 2009
@@ -191,7 +191,7 @@
}
const unit_map::iterator new_unit_itor = units.find(recruit_location);
if(new_unit_itor != units.end())
new_unit_itor->second.set_hidden(false);
- if(show)unit_display::unit_recruited(recruit_location,u->first);
+ if(show &&
u.valid())unit_display::unit_recruited(recruit_location,u->first);
if (is_recall)
{
LOG_NG << "firing recall event\n";
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits