Commit 8b7f0358 authored by DonLakeFlyer's avatar DonLakeFlyer

Fix crash from bad toolbox reference during shutdown

parent c4478240
......@@ -92,8 +92,7 @@ void AppLogModel::threadsafeLog(const QString message)
insertRows(line, 1);
setData(index(line), message, Qt::DisplayRole);
if (qgcApp()->logOutput()) {
if (_logFile.fileName().isEmpty()) {
if (_logFile.fileName().isEmpty() && qgcApp()->logOutput()) {
QGCToolbox* toolbox = qgcApp()->toolbox();
// Be careful of toolbox not being open yet
if (toolbox) {
......@@ -112,5 +111,4 @@ void AppLogModel::threadsafeLog(const QString message)
QTextStream out(&_logFile);
out << message << "\n";
}
}
}
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