Author: dfranke
Date: Sat Mar 28 10:36:40 2009
New Revision: 34206
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34206&view=rev
Log:
Make sure the formula_vars map is initialized before assigning to it. Fixes
bug #13279.
Modified:
branches/1.6/src/unit.cpp
Modified: branches/1.6/src/unit.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/unit.cpp?rev=34206&r1=34205&r2=34206&view=diff
==============================================================================
--- branches/1.6/src/unit.cpp (original)
+++ branches/1.6/src/unit.cpp Sat Mar 28 10:36:40 2009
@@ -1740,6 +1740,7 @@
}
void unit::add_formula_var(std::string str, variant var) {
+ if(!formula_vars_) formula_vars_ = new game_logic::map_formula_callable;
formula_vars_->add(str, var);
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits