diff --git a/src/ui/QGCUASFileView.cc b/src/ui/QGCUASFileView.cc index cf5fc678d7d890a00bd4e3695818b646123b966a..f34694d9a96c71cd9b446680bf24e88ba8d225b2 100644 --- a/src/ui/QGCUASFileView.cc +++ b/src/ui/QGCUASFileView.cc @@ -196,5 +196,5 @@ void QGCUASFileView::_downloadStatusMessage(const QString& msg) void QGCUASFileView::_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous) { Q_UNUSED(previous); - _ui.downloadButton->setEnabled(current->type() == _typeFile); + _ui.downloadButton->setEnabled(current ? (current->type() == _typeFile) : false); }