diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index b86a7542b8..37b3045513 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -170,7 +170,7 @@ bool cmIfCommand::InitialPass(std::vector const& args) cmRegularExpression regEntry(args[2].c_str()); // check for black line or comment - if (!regEntry.find(def)) + if (def && !regEntry.find(def)) { f = new cmIfFunctionBlocker(); }