Skip to content

Commit

Permalink
catch exceptions from playmp_controller destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 8, 2014
1 parent 4b2ea78 commit f165a55
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/playmp_controller.cpp
Expand Up @@ -59,11 +59,14 @@ playmp_controller::playmp_controller(const config& level,

playmp_controller::~playmp_controller() {
//halt and cancel the countdown timer
if(beep_warning_time_ < 0) {
sound::stop_bell();
}
try {

if(beep_warning_time_ < 0) {
sound::stop_bell();
}

turn_data_.host_transfer().detach_handler(this);
turn_data_.host_transfer().detach_handler(this);
} catch (...) {}
}

void playmp_controller::set_replay_last_turn(unsigned int turn){
Expand Down

0 comments on commit f165a55

Please sign in to comment.