diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3afbf679ab..8636aa0966 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1331,6 +1331,11 @@ void cmake::SetHomeOutputDirectory(const char* lib) void cmake::SetGlobalGenerator(cmGlobalGenerator *gg) { + if(!gg) + { + cmSystemTools::Error("Error SetGlobalGenerator called with null"); + return; + } // delete the old generator if (this->GlobalGenerator) {