[Marble-commits] branches/KDE/4.3/kdeedu/marble/src/lib

Bastian Holst bastianholst at gmx.de
Sat Jul 18 18:11:20 CEST 2009


SVN commit 998803 by bholst:

backport of r998797:
Marble PlacemarkManager didn't delete it's default MarbleGeometryModel, because it doesn't take ownership of it.
Now the MarbleGeometryModel is initialized with 0 to prevent this memory leak.
Thanks to mjansen.


 M  +2 -2      PlacemarkManager.cpp  


--- branches/KDE/4.3/kdeedu/marble/src/lib/PlacemarkManager.cpp #998802:998803
@@ -43,7 +43,7 @@
     public:
         PlacemarkManagerPrivate( QObject* parent )
         : m_model( 0 )
-        , m_geomodel( new MarbleGeometryModel() )
+        , m_geomodel( 0 )
         , m_fileViewModel( new FileViewModel(parent ) )
         , m_finalized( true )
         , m_target( QString() )
@@ -160,7 +160,7 @@
     }
 
     // do not set this file if it only contains points
-    if( doc->isVisible() )
+    if( doc->isVisible() && d->m_geomodel )
         d->m_geomodel->setGeoDataRoot( doc );
     emit geoDataDocumentAdded( *doc );
 }


More information about the Marble-commits mailing list