From 2e388cc3c2c0f670b9f1f53a0fbc1217db3c72e3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 16:10:07 -0500 Subject: [PATCH] file(GENERATE): Clear internal records between configures In the CMake interactive dialogs cmGlobalGenerator::Configure may run more than once. Clear the cmGlobalGenerator::EvaluationFiles data between configures to avoid accessing deleted data. --- Source/cmGlobalGenerator.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7f2b592f3..5fefebabe 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -848,6 +848,14 @@ void cmGlobalGenerator::Configure() delete this->LocalGenerators[i]; } this->LocalGenerators.clear(); + for(std::vector::const_iterator + li = this->EvaluationFiles.begin(); + li != this->EvaluationFiles.end(); + ++li) + { + delete *li; + } + this->EvaluationFiles.clear(); this->TargetDependencies.clear(); this->TotalTargets.clear(); this->ImportedTargets.clear();