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

Dennis Nienhüser earthwings at gentoo.org
Mon Jan 17 21:38:26 CET 2011


SVN commit 1215153 by nienhueser:

Don't crash if no facade has been set

 M  +6 -0      FileManager.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/FileManager.cpp #1215152:1215153
@@ -88,7 +88,9 @@
 {
     if ( !containers().contains( filepath ) ) {
         mDebug() << "adding container:" << filepath;
+        if ( d->m_datafacade ) {
         d->m_datafacade->connectTree( false );
+        }
         if (d->m_t == 0) {
             mDebug() << "Starting placemark loading timer";
             d->m_t = new QTime();
@@ -102,7 +104,9 @@
 
 void FileManager::addData( const QString &name, const QString &data )
 {
+    if ( d->m_datafacade ) {
     d->m_datafacade->connectTree( false );
+    }
     FileLoader* loader = new FileLoader( this, data, name );
     appendLoader( loader );
 }
@@ -181,7 +185,9 @@
         mDebug() << "Empty loader list, connecting";
         QTime t;
         t.start();
+        if ( d->m_datafacade ) {
         d->m_datafacade->connectTree( true );
+        }
         mDebug() << "Done " << t.elapsed() << " ms";
         qDebug() << "Finished loading all placemarks " << d->m_t->elapsed();
         delete d->m_t;


More information about the Marble-commits mailing list