Commit 0266c9bd authored by Peter Kuemmel's avatar Peter Kuemmel

Ninja: check for valid pointer

parent 5aab7f90
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment