From 4dc52865962414b2754c5a6db6ad68c0958f0eb0 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Mon, 25 Sep 2017 14:35:00 +0200 Subject: [PATCH] dbhub: Fix possible crash This fixes a crash that occurs if there is an error while fetching something other than a database and no database has been downloaded before, e.g. when getting the root directory listing fails. --- src/RemoteDatabase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RemoteDatabase.cpp b/src/RemoteDatabase.cpp index 9652ba53..c3801eea 100644 --- a/src/RemoteDatabase.cpp +++ b/src/RemoteDatabase.cpp @@ -238,7 +238,8 @@ void RemoteDatabase::gotError(QNetworkReply* reply, const QList& erro QMessageBox::warning(0, qApp->applicationName(), message); // Delete reply later, i.e. after returning from this slot function - m_progress->reset(); + if(m_progress) + m_progress->reset(); reply->deleteLater(); }