diff --git a/src/MissionManager/MissionItemTest.cc b/src/MissionManager/MissionItemTest.cc index e211f328ef3b9932c21e69ecdabaca619ae70c0f..2926e2036889a9b20284c1a6e2a4926b1adea57e 100644 --- a/src/MissionManager/MissionItemTest.cc +++ b/src/MissionManager/MissionItemTest.cc @@ -39,12 +39,11 @@ void MissionItemTest::init(void) MAV_TYPE_QUADROTOR, qgcApp()->toolbox()->firmwarePluginManager(), this); - } void MissionItemTest::cleanup(void) { - delete _offlineVehicle; + _offlineVehicle->deleteLater(); UnitTest::cleanup(); } diff --git a/src/MissionManager/VisualMissionItemTest.cc b/src/MissionManager/VisualMissionItemTest.cc index beb9cae0dea74d43e596b27bf14dd9b868df4a76..b3992a76ce16dcb84b280d553ba5003f9999a0f9 100644 --- a/src/MissionManager/VisualMissionItemTest.cc +++ b/src/MissionManager/VisualMissionItemTest.cc @@ -54,7 +54,7 @@ void VisualMissionItemTest::init(void) void VisualMissionItemTest::cleanup(void) { - delete _offlineVehicle; + _offlineVehicle->deleteLater(); UnitTest::cleanup(); }