Fix for bug #0010466, fix crash in --help-module.

This commit is contained in:
Bill Hoffman 2010-03-26 16:57:01 -04:00
parent 9345833272
commit 2c6f8de2cc

View File

@ -1177,12 +1177,19 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
this->CurrentArgument.c_str(), this->CurrentArgument.c_str(),
*this->AllSections["Modules"])) *this->AllSections["Modules"]))
{ {
if(this->AllSections["Modules"]->GetEntries().size())
{
this->PrintDocumentationCommand this->PrintDocumentationCommand
(os, this->AllSections["Modules"]->GetEntries()[0]); (os, this->AllSections["Modules"]->GetEntries()[0]);
os << "\n Defined in: "; os << "\n Defined in: ";
os << moduleName << "\n"; os << moduleName << "\n";
return true; return true;
} }
else
{
return false;
}
}
} }
// Argument was not a module. Complain. // Argument was not a module. Complain.