Commit f542e4e9 authored by Patrick José Pereira's avatar Patrick José Pereira

QGCMapEngine: Remove pointer check before delete

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent 01896c98
...@@ -60,10 +60,8 @@ getQGCMapEngine() ...@@ -60,10 +60,8 @@ getQGCMapEngine()
void void
destroyMapEngine() destroyMapEngine()
{ {
if(kMapEngine) { delete kMapEngine;
delete kMapEngine; kMapEngine = nullptr;
kMapEngine = nullptr;
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -105,8 +103,8 @@ QGCMapEngine::~QGCMapEngine() ...@@ -105,8 +103,8 @@ QGCMapEngine::~QGCMapEngine()
{ {
_worker.quit(); _worker.quit();
_worker.wait(); _worker.wait();
if(_urlFactory) delete _urlFactory;
delete _urlFactory; _urlFactory = nullptr;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -373,8 +371,8 @@ int ...@@ -373,8 +371,8 @@ int
QGCMapEngine::concurrentDownloads(QString type) QGCMapEngine::concurrentDownloads(QString type)
{ {
Q_UNUSED(type); Q_UNUSED(type);
// TODO : We may want different values depending on // TODO : We may want different values depending on
// the provider here, let it like this as all provider are set to 12 // the provider here, let it like this as all provider are set to 12
// at the moment // at the moment
return 12; return 12;
} }
...@@ -408,4 +406,3 @@ QGCMapEngine::_internetStatus(bool active) ...@@ -408,4 +406,3 @@ QGCMapEngine::_internetStatus(bool active)
} }
// Resolution math: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale // Resolution math: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale
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