diff --git a/src/ui/QGCUASFileView.cc b/src/ui/QGCUASFileView.cc index cf5fc67..f34694d 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); }