Author: mordante
Date: Sun Mar 13 08:49:13 2011
New Revision: 48869

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48869&view=rev
Log:
Make sure a reference isn't bound to a temporary.

The minimap widget which gets the references stores the reference not a
copy of the object.

Modified:
    trunk/src/tests/gui/test_gui2.cpp

Modified: trunk/src/tests/gui/test_gui2.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/gui/test_gui2.cpp?rev=48869&r1=48868&r2=48869&view=diff
==============================================================================
--- trunk/src/tests/gui/test_gui2.cpp (original)
+++ trunk/src/tests/gui/test_gui2.cpp Sun Mar 13 08:49:13 2011
@@ -484,7 +484,8 @@
        static gui2::tgame_load* create()
        {
                /** @todo Would be nice to add real data to the config. */
-               return new gui2::tgame_load(config());
+               static config cfg;
+               return new gui2::tgame_load(cfg);
        }
 
 };


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

Reply via email to