From 7843cab121be003a1a9132926c0950161015d3d4 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 6 Jul 2014 15:01:11 -0700 Subject: [PATCH] Fix crash after second push of List Files --- src/ui/QGCUASFileView.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/QGCUASFileView.cc b/src/ui/QGCUASFileView.cc index cf5fc678d..f34694d9a 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); } -- 2.22.0