summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 6717c3f..a91aa15 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -449,8 +449,8 @@ void cmGlobalNinjaGenerator
}
// check for mingw
- std::string cc = mf->GetDefinition("CMAKE_C_COMPILER");
- if(cc.find("gcc.exe") != std::string::npos)
+ const char* cc = mf->GetDefinition("CMAKE_C_COMPILER");
+ if(cc && std::string(cc).find("gcc.exe") != std::string::npos)
{
UsingMinGW = true;
}