Author: anonymissimus
Date: Tue May  3 19:04:09 2011
New Revision: 49350

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49350&view=rev
Log:
Throw a  game error when attempting to play a scenario with zero sides since 
this doesn't make any sense. (fix for bug #17995)

Modified:
    trunk/src/play_controller.cpp

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=49350&r1=49349&r2=49350&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Tue May  3 19:04:09 2011
@@ -216,8 +216,10 @@
                gamestate_.build_team_stage_two(tb_ptr);
        }
 
-       // mouse_handler expects at least one team for linger mode to work.
-       if (teams_.empty()) end_level_data_.linger_mode = false;
+       
+       if (teams_.empty()) {
+               throw game::game_error("The scenario is invalid, it has no 
sides!");
+       }
 
        LOG_NG << "loading units..." << (SDL_GetTicks() - ticks_) << "\n";
        loadscreen::start_stage("load units");


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

Reply via email to