diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 041653896..d0fe99f24 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -164,6 +164,11 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) } } } + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } this->VariableName = args[0]; if(this->CheckForVariableInCache()) {