diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-02-04 20:31:18 +0100 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-02-04 20:31:18 +0100 |
commit | 00e7ea76e83153db1f95289a4b101b3031c97b99 (patch) | |
tree | 5fc22432327133b3f43a7a0b5b697524a4dea413 | |
parent | aa78a60ca65b37472a6cb217a269ebd5e1a37b6e (diff) | |
download | cmake-00e7ea76e83153db1f95289a4b101b3031c97b99.tar.gz |
Fix crash in GraphVizWriter when GRAPHVIZ_TARGET_IGNORE_REGEX is used
GraphVizWriter could crash if GRAPHVIZ_TARGET_IGNORE_REGEX was set.
Patch from Christian Ehrlicher.
Alex
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index bdb33bcdfc..de95aa5931 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -272,6 +272,12 @@ void cmGraphVizWriter::WriteConnections(const char* targetName, std::map<cmStdString, cmStdString>::const_iterator libNameIt = this->TargetNamesNodes.find(libName); + // can happen e.g. if GRAPHVIZ_TARGET_IGNORE_REGEX is used + if(libNameIt == this->TargetNamesNodes.end()) + { + continue; + } + std::string connectionName = myNodeName; connectionName += "-"; connectionName += libNameIt->second; |