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:
parent
c4c6427ed6
commit
ae32622bcf
|
@ -117,7 +117,7 @@ void QCMake::setBinaryDirectory(const QString& _dir)
|
||||||
{
|
{
|
||||||
const char* extraGen = cachem->GetCacheValue("CMAKE_EXTRA_GENERATOR");
|
const char* extraGen = cachem->GetCacheValue("CMAKE_EXTRA_GENERATOR");
|
||||||
std::string curGen = cmExternalMakefileProjectGenerator::
|
std::string curGen = cmExternalMakefileProjectGenerator::
|
||||||
CreateFullGeneratorName(itm.GetValue(), extraGen);
|
CreateFullGeneratorName(itm.GetValue(), extraGen? extraGen : "");
|
||||||
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
|
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue