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

Torsten Rahn tackat at kde.org
Mon Jul 19 11:57:28 CEST 2010


SVN commit 1151664 by rahn:


- Don't crash on startup if the map theme doesn't have texture layers.



 M  +4 -2      MarbleModel.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1151663:1151664
@@ -357,13 +357,13 @@
             qDebug("Tile creation completed");
             delete tileCreatorDlg;
         }
+        
+        setupTextureMapper( currentProjection );
     }
     else {
         d->m_tileLoader->flush();
     }
 
-    setupTextureMapper( currentProjection );
-
     // Set all the colors for the vector layers
     if ( d->m_mapTheme->map()->hasVectorLayers() && d->m_veccomposer ) {
         d->m_veccomposer->setOceanColor( d->m_mapTheme->map()->backgroundColor() );
@@ -479,6 +479,8 @@
 
 void MarbleModel::setupTextureMapper( Projection projection )
 {
+    if ( !d->m_mapTheme->map()->hasTextureLayers() )
+        return;
   // FIXME: replace this with an approach based on the factory method pattern.
     delete d->m_texmapper;
 


More information about the Marble-commits mailing list