Commit f46b74d8 authored by Don Gagne's avatar Don Gagne

Fix crash

parent ff60b3c1
......@@ -243,9 +243,11 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
UAS::~UAS()
{
stopHil();
// wait for the simulator to exit
simulation->wait();
simulation->deleteLater();
if (simulation) {
// wait for the simulator to exit
simulation->wait();
simulation->deleteLater();
}
writeSettings();
}
......
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