Skip to content

Commit

Permalink
catch exceptions thrown in whiteboard temporary unit hider dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 8, 2014
1 parent 675eb58 commit 8231aa9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/whiteboard/utility.cpp
Expand Up @@ -131,8 +131,12 @@ int path_cost(std::vector<map_location> const& path, unit const& u)
temporary_unit_hider::temporary_unit_hider(unit& u)
: unit_(&u)
{unit_->set_hidden(true);}
temporary_unit_hider::~temporary_unit_hider()
{unit_->set_hidden(false);}
temporary_unit_hider::~temporary_unit_hider()
{
try {
unit_->set_hidden(false);
} catch (...) {}
}

void ghost_owner_unit(unit* unit)
{
Expand Down

0 comments on commit 8231aa9

Please sign in to comment.