summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-15 16:48:31 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-15 16:48:31 (GMT)
commit78588e03435103fca17372278cbecf29c867eec1 (patch)
tree1a5bbd2927ef8fddfde305e795150c73f474789e /Source/cmGlobalNinjaGenerator.cxx
parent0c89c10cfcd9bdd11531e3680216235f5b34ac8e (diff)
downloadCMake-78588e03435103fca17372278cbecf29c867eec1.zip
CMake-78588e03435103fca17372278cbecf29c867eec1.tar.gz
CMake-78588e03435103fca17372278cbecf29c867eec1.tar.bz2
Ninja: there could be null pointers
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 3c97afc..ca3a270 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -474,10 +474,11 @@ void cmGlobalNinjaGenerator
if(mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
{
UsingMinGW = true;
- if(!mf->GetDefinition("CMAKE_RC_COMPILER"))
+ if(!mf->GetDefinition("CMAKE_RC_COMPILER")
+ && mf->GetDefinition("CMAKE_C_COMPILER"))
{
std::string windres = "windres";
- std::string gcc = mf->GetRequiredDefinition("CMAKE_C_COMPILER");
+ std::string gcc = mf->GetDefinition("CMAKE_C_COMPILER");
std::string::size_type prefix = gcc.rfind("gcc");
if (prefix != std::string::npos)
windres.insert(0, gcc.substr(0, prefix));