Commit 46d61652 authored by Pierre TILAK's avatar Pierre TILAK

Avoid a segfault, error handling

parent abe232e0
......@@ -201,7 +201,15 @@ void QGCCachedTileSet::_doneWithDownload()
_totalTileCount = _savedTileCount;
_totalTileSize = _savedTileSize;
//-- Too expensive to compute the real size now. Estimate it for the time being.
quint32 avg = _savedTileSize / _savedTileCount;
quint32 avg;
if(_savedTileSize != 0){
avg = _savedTileSize / _savedTileCount;
}
else{
qWarning() << "QGCMapEngineManager::_doneWithDownload _savedTileSize=0 !";
avg = 0;
}
_uniqueTileSize = _uniqueTileCount * avg;
}
emit totalTileCountChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment