diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-15 16:48:31 (GMT) |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-15 16:48:31 (GMT) |
commit | 78588e03435103fca17372278cbecf29c867eec1 (patch) | |
tree | 1a5bbd2927ef8fddfde305e795150c73f474789e /Source/cmGlobalNinjaGenerator.cxx | |
parent | 0c89c10cfcd9bdd11531e3680216235f5b34ac8e (diff) | |
download | CMake-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.cxx | 5 |
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)); |