Commit 98c2f5d9 authored by Patrick José Pereira's avatar Patrick José Pereira

QGCCameraControl: Remove pointer check before delete

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent e354232b
......@@ -189,9 +189,8 @@ QGCCameraControl::QGCCameraControl(const mavlink_camera_information_t *info, Veh
//-----------------------------------------------------------------------------
QGCCameraControl::~QGCCameraControl()
{
if(_netManager) {
delete _netManager;
}
delete _netManager;
_netManager = nullptr;
}
//-----------------------------------------------------------------------------
......@@ -217,10 +216,9 @@ QGCCameraControl::_initWhenReady()
QTimer::singleShot(2500, this, &QGCCameraControl::_requestStorageInfo);
_captureStatusTimer.start(2750);
emit infoChanged();
if(_netManager) {
delete _netManager;
_netManager = nullptr;
}
delete _netManager;
_netManager = 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