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