[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Tue May 11 23:55:34 CEST 2010
SVN commit 1125660 by jmhoffmann:
DownloadRegionDialog: Fix crash when switching to a map theme without texture layer.
The problem was that d->m_textureLayer is used in the tiles count calculation. If
there is no texture layer, the tiles count is simply 0.
M +8 -1 DownloadRegionDialog.cpp
--- trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.cpp #1125659:1125660
@@ -316,8 +316,15 @@
void DownloadRegionDialog::updateTilesCount()
{
+ qint64 tilesCount;
+ if ( d->m_textureLayer ) {
TileCoordsPyramid const pyramid = region();
- qint64 const tilesCount = pyramid.tilesCount();
+ tilesCount = pyramid.tilesCount();
+ }
+ else {
+ tilesCount = 0;
+ }
+
if ( tilesCount > maxTilesCount ) {
d->m_tilesCountLimitInfo->setText( tr( "There is a limit of %n tiles to download.", "",
maxTilesCount ));
More information about the Marble-commits
mailing list