Author: jhinrichs
Date: Sat Mar 1 09:32:13 2008
New Revision: 24170
URL: http://svn.gna.org/viewcvs/wesnoth?rev=24170&view=rev
Log:
Small addition to make sure we don't run into unwanted behaviour due to invalid
pointers.
Modified:
trunk/src/replay_controller.cpp
Modified: trunk/src/replay_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay_controller.cpp?rev=24170&r1=24169&r2=24170&view=diff
==============================================================================
--- trunk/src/replay_controller.cpp (original)
+++ trunk/src/replay_controller.cpp Sat Mar 1 09:32:13 2008
@@ -82,6 +82,10 @@
}
replay_controller::~replay_controller(){
+ //YogiHH
+ //not absolutely sure if this is needed, but it makes me feel a lot
better ;-)
+ //feel free to delete this if it is not necessary
+ gui_->get_theme().theme_reset().detach_handler(this);
}
bool replay_controller::continue_replay() {
@@ -303,9 +307,9 @@
events::raise_draw_event();
bool last_team = false;
-
+
while ( (!last_team) && (!recorder.at_end()) && is_playing_ ){
- last_team = static_cast<size_t>(player_number_) ==
teams_.size();
+ last_team = static_cast<size_t>(player_number_) ==
teams_.size();
play_side(player_number_ - 1, false);
play_slice();
}
@@ -348,7 +352,7 @@
}
player_number_++;
-
+
if (static_cast<size_t>(player_number_) > teams_.size()){
status_.next_turn();
finish_turn();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits