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.
This commit is contained in:
parent
cbc9a9514d
commit
326d15a329
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue