Skip to content

Commit

Permalink
catch exceptions thrown in unit dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 8, 2014
1 parent 0ce40e7 commit 0e24beb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unit.cpp
Expand Up @@ -622,6 +622,7 @@ unit::unit(const unit_type &u_type, int side, bool real_unit,

unit::~unit()
{
try {
clear_haloes();

// Remove us from the status cache
Expand All @@ -631,6 +632,7 @@ unit::~unit()
if(itor != units_with_cache.end()) {
units_with_cache.erase(itor);
}
} catch (...) {}
}


Expand Down

0 comments on commit 0e24beb

Please sign in to comment.