summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index fc2fb14..1dfc784 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -1177,11 +1177,18 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
this->CurrentArgument.c_str(),
*this->AllSections["Modules"]))
{
- this->PrintDocumentationCommand
- (os, this->AllSections["Modules"]->GetEntries()[0]);
- os << "\n Defined in: ";
- os << moduleName << "\n";
- return true;
+ if(this->AllSections["Modules"]->GetEntries().size())
+ {
+ this->PrintDocumentationCommand
+ (os, this->AllSections["Modules"]->GetEntries()[0]);
+ os << "\n Defined in: ";
+ os << moduleName << "\n";
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
}