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:
Brad King 2014-03-12 09:54:20 -04:00
parent c4c6427ed6
commit ae32622bcf
1 changed files with 1 additions and 1 deletions

View File

@ -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()));
}
}