summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-02-08 14:18:48 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2011-02-08 14:18:48 -0500
commit7f87205161bb7d87b20e37b58079a8fab3d27640 (patch)
treedd9cca66b0937f14a3acecf2bb4dda505d575e4c
parent5b8869faea87187743b7a1578f29b5c3223fee19 (diff)
parent00e7ea76e83153db1f95289a4b101b3031c97b99 (diff)
downloadcmake-7f87205161bb7d87b20e37b58079a8fab3d27640.tar.gz
Merge topic 'FixCrashInGraphVizWriter'
00e7ea7 Fix crash in GraphVizWriter when GRAPHVIZ_TARGET_IGNORE_REGEX is used
-rw-r--r--Source/cmGraphVizWriter.cxx6
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;