Merge topic 'find-command-crash'

183d261 Fix find_* argument parsing crash (#11513)
This commit is contained in:
Brad King 2010-12-02 14:25:10 -05:00 committed by CMake Topic Stage
commit 6a07b22bf9
1 changed files with 5 additions and 0 deletions

View File

@ -164,6 +164,11 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
}
}
}
if(args.size() < 2 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
this->VariableName = args[0];
if(this->CheckForVariableInCache())
{