From 6a2174ff9da95fa52f455ef81ff5785bf312fda9 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 12 Sep 2002 11:12:31 -0400 Subject: Add more error checking --- Source/cmCacheManager.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 7412681..73017b4 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -410,7 +410,15 @@ bool cmCacheManager::SaveCache(const char* path) std::string key; std::string rkey = i.GetName(); std::string helpstring; - helpstring = i.GetProperty("HELPSTRING"); + const char* hs = i.GetProperty("HELPSTRING") + if ( hs ) + { + helpstring = i.GetProperty("HELPSTRING"); + } + else + { + helpstring = ""; + } cmCacheManager::OutputHelpString(fout, helpstring.c_str()); // support : in key name by double quoting if(rkey.find(':') != std::string::npos || -- cgit v0.12