From: Tobias Markus Date: Fri, 27 Feb 2015 22:31:58 +0000 (+0100) Subject: Fix coverity #29604 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4d73312184d671950928b48db4b940def45eaa1e;p=supertux.git Fix coverity #29604 --- diff --git a/src/supertux/sector.cpp b/src/supertux/sector.cpp index 8575297ae..c9879c9c0 100644 --- a/src/supertux/sector.cpp +++ b/src/supertux/sector.cpp @@ -115,8 +115,15 @@ Sector::Sector(Level* parent) : Sector::~Sector() { using namespace scripting; + try + { + deactivate(); + } + catch(const std::exception& err) + { + log_warning << err.what() << std::endl; + } - deactivate(); for(auto i = scripts.begin(); i != scripts.end(); ++i) { HSQOBJECT& object = *i;