Commit 31cc61db authored by Don Gagne's avatar Don Gagne

Merge pull request #1486 from DonLakeFlyer/AirframeConfig

Fix crash on reconnect
parents dbe032ea 2ba91017
......@@ -619,7 +619,7 @@ void QGCApplication::reconnectAfterWait(int waitSeconds)
LinkInterface* link = linkManager->getLinks()[0];
// Save the link configuration so we can restart the link laster
_reconnectLinkConfig = linkManager->getLinks()[0]->getLinkConfiguration();
_reconnectLinkConfig = LinkConfiguration::duplicateSettings(linkManager->getLinks()[0]->getLinkConfiguration());
// Disconnect and wait
......@@ -629,6 +629,9 @@ void QGCApplication::reconnectAfterWait(int waitSeconds)
void QGCApplication::_reconnect(void)
{
Q_ASSERT(_reconnectLinkConfig);
qgcApp()->restoreOverrideCursor();
LinkManager::instance()->createConnectedLink(_reconnectLinkConfig);
_reconnectLinkConfig = NULL;
}
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