1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix crash if autoupdate runs on exit

This commit is contained in:
tux3 2015-12-12 15:56:00 +01:00
parent faa1c3a5d5
commit a47e81d227

View File

@ -103,6 +103,9 @@ AutoUpdater::VersionInfo AutoUpdater::getUpdateVersion()
if (platform.isEmpty())
return versionInfo;
if (abortFlag)
return versionInfo;
QNetworkAccessManager *manager = new QNetworkAccessManager;
QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(checkURI)));
while (!reply->isFinished())
@ -534,6 +537,8 @@ void AutoUpdater::checkUpdatesAsyncInteractiveWorker()
QDateTime::fromMSecsSinceEpoch(newVersion.timestamp*1000).toString());
if (abortFlag)
return;
if (GUI::askQuestion(QObject::tr("Update", "The title of a message box"),
contentText, true, false))