[Marble-commits] branches/KDE/4.6/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Tue Jan 18 20:23:06 CET 2011
SVN commit 1215455 by nienhueser:
Don't crash when setting an invalid map theme and the fallback theme does not work either.
Backport of commit 1215453.
M +5 -3 MarbleMap.cpp
--- branches/KDE/4.6/kdeedu/marble/src/lib/MarbleMap.cpp #1215454:1215455
@@ -856,6 +856,10 @@
d->m_viewParams.setMapThemeId( mapThemeId );
GeoSceneDocument *mapTheme = d->m_viewParams.mapTheme();
+ if ( !mapTheme ) {
+ return;
+ }
+
// NOTE due to frequent regressions:
// Do NOT take it for granted that there is any TEXTURE or VECTOR data AVAILABLE
// at this point. Some themes do NOT have either vector or texture data!
@@ -902,7 +906,7 @@
// at this point.
// Check whether there is a texture layer available:
- if ( mapTheme && mapTheme->map()->hasTextureLayers() ) {
+ if ( mapTheme->map()->hasTextureLayers() ) {
d->m_textureLayer.setMapTheme( mapTheme );
// If the tiles aren't already there, put up a progress dialog
// while creating them.
@@ -949,11 +953,9 @@
d->m_placemarkLayout.requestStyleReset();
- if ( mapTheme ) {
d->m_model->setMapTheme( mapTheme );
centerSun();
- }
d->m_layerManager.syncViewParamsAndPlugins( mapTheme );
}
More information about the Marble-commits
mailing list