summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFindBase.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 0416538..d0fe99f 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -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())
{