Author: silene
Date: Mon Apr 13 16:21:56 2009
New Revision: 34865

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34865&view=rev
Log:
Fixed segfault. Reference should never be used on the result of a ternary 
operator.

Modified:
    trunk/src/menu_events.cpp

Modified: trunk/src/menu_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=34865&r1=34864&r2=34865&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Mon Apr 13 16:21:56 2009
@@ -882,7 +882,7 @@
 
                        for(std::vector<unit>::const_iterator u = 
recall_list.begin(); u != recall_list.end(); ++u) {
                                std::stringstream option, option_to_filter;
-                               const std::string& name = u->name().empty() ? 
"-" : u->name();
+                               std::string name = u->name().empty() ? "-" : 
u->name();
 
                                option << IMAGE_PREFIX << u->absolute_image();
 #ifndef LOW_MEM


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to