diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 3478a68c5..181435ef1 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -83,6 +83,7 @@ FGModelMgr::add_model (SGPropertyNode * node) } catch (const sg_throwable& t) { SG_LOG(SG_GENERAL, SG_ALERT, "Error loading " << path << ":\n " << t.getFormattedMessage() << t.getOrigin()); + delete instance; return; }