diff options
author | Brad King <brad.king@kitware.com> | 2014-05-27 20:03:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-27 20:11:04 (GMT) |
commit | 326d15a3294e3b43de534130a4b655ddb454fbfb (patch) | |
tree | 13756dcc66349b7aa5cdeac66b4c8f83bc8d51dd /Source/cmake.cxx | |
parent | cbc9a9514d0dd00b35b3de694dab02a387ec2b52 (diff) | |
download | CMake-326d15a3294e3b43de534130a4b655ddb454fbfb.zip CMake-326d15a3294e3b43de534130a4b655ddb454fbfb.tar.gz CMake-326d15a3294e3b43de534130a4b655ddb454fbfb.tar.bz2 |
cmake: Tolerate missing HELPSTRING on compiler change
Teach cmake::HandleDeleteCacheVariables to tolerate a missing HELPSTRING
(NULL pointer) when saving cache entries. In the absence of other bugs
this should not be possible, but avoid the crash just in case.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index abbabe7..4f14d73 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1231,7 +1231,10 @@ int cmake::HandleDeleteCacheVariables(const char* var) if(ci.Find(save.key.c_str())) { save.type = ci.GetType(); - save.help = ci.GetProperty("HELPSTRING"); + if(const char* help = ci.GetProperty("HELPSTRING")) + { + save.help = help; + } } saved.push_back(save); } |