UpdateInfo: Fix crash on close while searching for updates

The ShellCommand deletes itself if run asynchronously, and it also
cancels itself when ICore sends coreAboutToClose, so we must be prepared
for it to vanish at any time.

Task-number: QTCREATORBUG-19165
Change-Id: I6d6a737ea529012976a623f812f2c426518557fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2017-11-08 09:40:38 +01:00
parent 1305068375
commit 2baf163044

View File

@@ -42,6 +42,7 @@
#include <QMenu>
#include <QMessageBox>
#include <QMetaEnum>
#include <QPointer>
#include <QProcessEnvironment>
#include <QTimer>
#include <QtPlugin>
@@ -68,7 +69,7 @@ public:
{ }
QString m_maintenanceTool;
ShellCommand *m_checkUpdatesCommand = 0;
QPointer<ShellCommand> m_checkUpdatesCommand;
QString m_collectedOutput;
QTimer *m_checkUpdatesTimer = 0;