Browse Source

BUG: fix null pointer read if def is not defined

Bill Hoffman 24 years ago
parent
commit
97f50b6e7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmIfCommand.cxx

+ 1 - 1
Source/cmIfCommand.cxx

@@ -170,7 +170,7 @@ bool cmIfCommand::InitialPass(std::vector<std::string> 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();
       }