diff options
-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); + } } } |