diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-05-07 15:38:42 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-05-14 11:11:49 +0000 |
commit | 1642cd883d7a9a6961122531aa13f33a5f960d6c (patch) | |
tree | 237b04c4a7969bc387dbb7633dd5fa4309889f7e | |
parent | 82e2ad0d82b3afccbda2677385364cfdb65f5ab2 (diff) |
Fix crash in updater if component does not exist anymore
Task-number: QTIFW-1140
Change-Id: I2038bb04526d6fbc3b35be67777a1096f80568cf
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r-- | src/libs/installer/uninstallercalculator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libs/installer/uninstallercalculator.cpp b/src/libs/installer/uninstallercalculator.cpp index 597c7902f..5bdd56e34 100644 --- a/src/libs/installer/uninstallercalculator.cpp +++ b/src/libs/installer/uninstallercalculator.cpp @@ -102,10 +102,9 @@ void UninstallerCalculator::appendComponentsToUninstall(const QList<Component*> foreach (const QString &possibleName, possibleNames) { Component *cc = PackageManagerCore::componentByName(possibleName, m_installedComponents); - if (!cc->uninstallationRequested()) { - if (cc->installAction() != ComponentModelHelper::AutodependUninstallation) { - autoDependencies.removeAll(possibleName); - } + if (cc && (cc->installAction() != ComponentModelHelper::AutodependUninstallation)) { + autoDependencies.removeAll(possibleName); + } } } |