summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-12 15:12:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-12 15:12:31 (GMT)
commit6a2174ff9da95fa52f455ef81ff5785bf312fda9 (patch)
tree86aee543598a3b8913263d9c374718bcc169651d /Source
parent31f714fc2a4a51300409615e5fca9cf42e5747b1 (diff)
downloadCMake-6a2174ff9da95fa52f455ef81ff5785bf312fda9.zip
CMake-6a2174ff9da95fa52f455ef81ff5785bf312fda9.tar.gz
CMake-6a2174ff9da95fa52f455ef81ff5785bf312fda9.tar.bz2
Add more error checking
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCacheManager.cxx10
1 files changed, 9 insertions, 1 deletions
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 ||