catch exceptions thrown in whiteboard temporary unit hider dtor

This commit is contained in:
Chris Beck 2014-06-07 23:37:36 -04:00
parent 675eb58975
commit 8231aa9345

View file

@ -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)
{