summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2011-11-29 16:53:25 +0100
committerTim Jenssen <tim.jenssen@nokia.com>2011-11-29 17:26:07 +0100
commitc31af2fce187fcdf4159642d2ab38ae4474815f1 (patch)
tree9f081a8338ae853edefab39be9c776713e73269e /installerbuilder
parent46beee422bef7d529bd120cb680d15d7dfc305bf (diff)
fix a crash if the replaces is not existing
Change-Id: I2b65c343f701d67577e2b127b47054368ce583c7 Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index 14a29022c..facf5b6b3 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -1557,15 +1557,20 @@ void PackageManagerCore::storeReplacedComponents(QHash<QString, Component *> &co
for (; it != data.replacementToExchangeables.constEnd(); ++it) {
foreach (const QString &componentName, it.value()) {
Component *component = components.take(componentName);
- if (!component && !d->componentsToReplace(data.runMode).contains(componentName)) {
+ // if one component has a replaces which is not existing in the current component list anymore,
+ // just ignore it
+ if (!component) {
+ qDebug() << componentName << " - Does not exist in the repositories anymore.";
+ continue;
+ }
+ if (!d->componentsToReplace(data.runMode).contains(componentName)) {
component = new Component(this);
component->setValue(scName, componentName);
} else {
component->loadComponentScript();
d->replacementDependencyComponents(data.runMode).append(component);
}
- if (component)
- d->componentsToReplace(data.runMode).insert(componentName, qMakePair(it.key(), component));
+ d->componentsToReplace(data.runMode).insert(componentName, qMakePair(it.key(), component));
}
}
}