Fix possible crash in target

We need to make sure to remove RCs we delete from the lists held in
the updateDefaultRunConfigurations method.

Change-Id: Icf7908af3554e682af6ba9101058cb210e35f999
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2013-05-29 15:27:05 +02:00
parent 9072db09ab
commit 6567a67394

View File

@@ -658,8 +658,10 @@ void Target::updateDefaultRunConfigurations()
} }
// Do actual changes: // Do actual changes:
foreach (RunConfiguration *rc, toRemove) foreach (RunConfiguration *rc, toRemove) {
removeRunConfiguration(rc); removeRunConfiguration(rc);
existingConfigured.removeOne(rc); // make sure to also remove them from existingConfigured!
}
if (removeExistingUnconfigured) { if (removeExistingUnconfigured) {
foreach (RunConfiguration *rc, existingUnconfigured) foreach (RunConfiguration *rc, existingUnconfigured)