summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index b07ab5f..c0919fb 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -438,7 +438,14 @@ void cmCacheManager::OutputHelpString(std::ofstream& fout,
void cmCacheManager::RemoveCacheEntry(const char* key)
{
- m_Cache.erase(key);
+ if(m_Cache.count(key))
+ {
+ m_Cache.erase(key);
+ }
+ else
+ {
+ std::cerr << "Failed to remove entry" << std::endl;
+ }
}