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.
This commit is contained in:
Martin Kleusberg
2017-09-25 14:35:00 +02:00
parent 18bcbf138f
commit 4dc5286596

View File

@@ -238,7 +238,8 @@ void RemoteDatabase::gotError(QNetworkReply* reply, const QList<QSslError>& 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();
}