Ninja: check for valid pointer

This commit is contained in:
Peter Kuemmel 2012-06-05 23:29:29 +02:00
parent 5aab7f90f1
commit 0266c9bd19
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}