[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/marble/marble-1.1/src/lib
From: Dennis Nienhüser <earthwings () gentoo ! org>
Date: 2011-01-18 19:20:31
Message-ID: 20110118192031.EB3EFAC8B6 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1215454 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/marble/marble-1.1/src/lib/MarbleMap.cpp #1215453:1215454
@@ -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 );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic