summaryrefslogtreecommitdiff
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 676074fddb..1465f907be 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -403,6 +403,10 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot,
: Context(cc)
, Snapshot(snapshot)
{
+ if (this->Snapshot.IsValid())
+ {
+ this->Snapshot.Keep();
+ }
}
cmListFileBacktrace::~cmListFileBacktrace()