diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2010-03-26 20:57:01 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2010-03-26 20:57:01 (GMT) |
commit | 2c6f8de2cc79ec2aeade156c83611231f59cc6fd (patch) | |
tree | f0204799dcd7f462b7c263f5bf6f1cf0797f42c9 /Source/cmDocumentation.cxx | |
parent | 93458332720dc0c237360d8350c4d16b5d8e68c9 (diff) | |
download | CMake-2c6f8de2cc79ec2aeade156c83611231f59cc6fd.zip CMake-2c6f8de2cc79ec2aeade156c83611231f59cc6fd.tar.gz CMake-2c6f8de2cc79ec2aeade156c83611231f59cc6fd.tar.bz2 |
Fix for bug #0010466, fix crash in --help-module.
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r-- | Source/cmDocumentation.cxx | 17 |
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; + } } } |