diff --git a/simgear/scene/tgdb/ReaderWriterSPT.cxx b/simgear/scene/tgdb/ReaderWriterSPT.cxx index 38a24f62..25a28f20 100644 --- a/simgear/scene/tgdb/ReaderWriterSPT.cxx +++ b/simgear/scene/tgdb/ReaderWriterSPT.cxx @@ -286,7 +286,7 @@ ReaderWriterSPT::createTree(const BucketBox& bucketBox, const LocalOptions& opti osg::ref_ptr ReaderWriterSPT::createPagedLOD(const BucketBox& bucketBox, const LocalOptions& options) const { - osg::PagedLOD* pagedLOD = new osg::PagedLOD; + osg::ref_ptr pagedLOD = new osg::PagedLOD; pagedLOD->setCenterMode(osg::PagedLOD::USER_DEFINED_CENTER); SGSpheref sphere = bucketBox.getBoundingSphere();