mail[Wesnoth-commits] r34067 - /trunk/src/formula.cpp


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

Header


Content

Posted by jeremy . rosen on March 23, 2009 - 20:04:
Author: boucman
Date: Mon Mar 23 20:04:12 2009
New Revision: 34067

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34067&view=rev
Log:
preemptive handling of null pointers in FAI, patch by Crab (patch 1136)

Modified:
    trunk/src/formula.cpp

Modified: trunk/src/formula.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula.cpp?rev=34067&r1=34066&r2=34067&view=diff
==============================================================================
--- trunk/src/formula.cpp (original)
+++ trunk/src/formula.cpp Mon Mar 23 20:04:12 2009
@@ -678,6 +678,9 @@
                                ++i1;
                        }
                        const std::string precond = "";
+                       if(symbols == NULL) {
+                               throw formula_error("Function symbol table 
required but not present", "",*i1->filename, i1->line_number);
+                       }
                        symbols->add_formula_function(formula_name,
                                        const_formula_ptr(new formula(beg, 
i1, symbols)),
                                        
formula::create_optional_formula(precond, symbols),




Related Messages


Powered by MHonArc, Updated Mon Mar 23 21:40:55 2009