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;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -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