From ce63ee8ac3ee460ddb05c1b9e00e667840e5a3b7 Mon Sep 17 00:00:00 2001
From: till busch <buti@bux.at>
Date: Wed, 19 Mar 2008 13:28:57 +0100
Subject: [PATCH] fix a memory leak in SGPagedLOD
(depends on 0004-use-SGPropertyNode_ptr-for-all-props-in-FGGlobals.patch)
---
 simgear/scene/model/modellib.cxx |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx
index f446bff..b1b8a70 100644
--- a/simgear/scene/model/modellib.cxx
+++ b/simgear/scene/model/modellib.cxx
@@ -77,7 +77,6 @@ SGModelLib::loadModel(const string &path,
     if(data)
         data->modelLoaded(path, data->getProperties(), n);
     return n;
-   //return sgLoad3DModel_internal(path, prop_root, data);
 
 }
 
@@ -87,11 +86,9 @@ SGModelLib::loadModel(const string &path,
                                 panel_func pf)
 {
     osg::ref_ptr<SGReaderWriterXMLOptions> opt = new SGReaderWriterXMLOptions(*(osgDB::Registry::instance()->getOptions()));
-    //SGReaderWriterXMLOptions* opt = new SGReaderWriterXMLOptions(*(osgDB::Registry::instance()->getOptions()));
     opt->setPropRoot(prop_root);
     opt->setLoadPanel(pf);
-    osg::Node *n=readNodeFile(path, opt.release());
-    return n;
+    return readNodeFile(path, opt.get());
 }
 
 osg::Node*
-- 
1.5.2.5


