From 4d73312184d671950928b48db4b940def45eaa1e Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Fri, 27 Feb 2015 23:31:58 +0100 Subject: [PATCH] Fix coverity #29604 --- src/supertux/sector.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.11.0