Commit 2be698fd authored by Patrick José Pereira's avatar Patrick José Pereira

AirspaceManager: Remove pointer check before delete

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent 1d5c87d7
......@@ -48,21 +48,16 @@ AirspaceManager::AirspaceManager(QGCApplication* app, QGCToolbox* toolbox)
//-----------------------------------------------------------------------------
AirspaceManager::~AirspaceManager()
{
if(_advisories) {
delete _advisories;
}
if(_weatherProvider) {
delete _weatherProvider;
}
if(_ruleSetsProvider) {
delete _ruleSetsProvider;
}
if(_airspaces) {
delete _airspaces;
}
if(_flightPlan) {
delete _flightPlan;
}
delete _advisories;
_advisories = nullptr;
delete _weatherProvider;
_weatherProvider = nullptr;
delete _ruleSetsProvider;
_ruleSetsProvider = nullptr;
delete _airspaces;
_airspaces = nullptr;
delete _flightPlan;
_flightPlan = nullptr;
}
//-----------------------------------------------------------------------------
......
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