Author: soliton
Date: Thu May 28 17:55:15 2009
New Revision: 35917

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35917&view=rev
Log:
throw an error when the scenario has no id (weird things will happen 
otherwise..)

Modified:
    trunk/src/multiplayer_connect.cpp

Modified: trunk/src/multiplayer_connect.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_connect.cpp?rev=35917&r1=35916&r2=35917&view=diff
==============================================================================
--- trunk/src/multiplayer_connect.cpp (original)
+++ trunk/src/multiplayer_connect.cpp Thu May 28 17:55:15 2009
@@ -1027,6 +1027,9 @@
        if(get_result() == QUIT
                || get_result() == CREATE)
                return;
+       if (level_["id"].empty()) {
+               throw config::error(_("The scenario is invalid because it has 
no id."));
+       }
        lists_init();
        if(sides_.empty()) {
                throw config::error(_("The scenario is invalid because it has 
no sides."));


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

Reply via email to