Add more error checking

This commit is contained in:
Andy Cedilnik 2002-09-12 11:12:31 -04:00
parent 31f714fc2a
commit 6a2174ff9d
1 changed files with 9 additions and 1 deletions

View File

@ -410,7 +410,15 @@ bool cmCacheManager::SaveCache(const char* path)
std::string key; std::string key;
std::string rkey = i.GetName(); std::string rkey = i.GetName();
std::string helpstring; std::string helpstring;
const char* hs = i.GetProperty("HELPSTRING")
if ( hs )
{
helpstring = i.GetProperty("HELPSTRING"); helpstring = i.GetProperty("HELPSTRING");
}
else
{
helpstring = "";
}
cmCacheManager::OutputHelpString(fout, helpstring.c_str()); cmCacheManager::OutputHelpString(fout, helpstring.c_str());
// support : in key name by double quoting // support : in key name by double quoting
if(rkey.find(':') != std::string::npos || if(rkey.find(':') != std::string::npos ||