mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 23:30:35 -06:00
cmake-gui: Fix handling of missing CMAKE_EXTRA_GENERATOR (#14804)
Since commit 1a1b737c (stringapi: Use strings for generator names,
2014-02-24) cmExternalMakefileProjectGenerator::CreateFullGeneratorName
expects a std::string instead of const char*. When no extra generator
name is available, pass an empty string to avoid NULL dereference.
This commit is contained in:
@@ -117,7 +117,7 @@ void QCMake::setBinaryDirectory(const QString& _dir)
|
||||
{
|
||||
const char* extraGen = cachem->GetCacheValue("CMAKE_EXTRA_GENERATOR");
|
||||
std::string curGen = cmExternalMakefileProjectGenerator::
|
||||
CreateFullGeneratorName(itm.GetValue(), extraGen);
|
||||
CreateFullGeneratorName(itm.GetValue(), extraGen? extraGen : "");
|
||||
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user