From 0266c9bd1979b1136b33b4ca281eca00925e24cb Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Tue, 5 Jun 2012 23:29:29 +0200 Subject: [PATCH] Ninja: check for valid pointer --- Source/cmGlobalNinjaGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 6717c3f70..a91aa15c3 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; }