summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-12 13:54:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-12 13:55:23 (GMT)
commitae32622bcfe4aee667b749f89e61d9a4fe44c762 (patch)
tree16b4c28f2b04407b891106e47901dee37f1d6494 /Source
parentc4c6427ed656e181d569d1c7baca29813c12b9fb (diff)
downloadCMake-ae32622bcfe4aee667b749f89e61d9a4fe44c762.zip
CMake-ae32622bcfe4aee667b749f89e61d9a4fe44c762.tar.gz
CMake-ae32622bcfe4aee667b749f89e61d9a4fe44c762.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/QtDialog/QCMake.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 12da320..5f9ebaf 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -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()));
}
}