summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-01-09 18:28:36 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-01-09 18:28:36 (GMT)
commit50f82c94b9bf1ff982f9ddd8b9a88fb91d9e0bec (patch)
tree52278be9dd4d8f7f9506e1c25282195bb85b06c2
parentcd8a78e657556aaa2f3a5fa2120d3181523985ba (diff)
downloadDoxygen-50f82c94b9bf1ff982f9ddd8b9a88fb91d9e0bec.zip
Doxygen-50f82c94b9bf1ff982f9ddd8b9a88fb91d9e0bec.tar.gz
Doxygen-50f82c94b9bf1ff982f9ddd8b9a88fb91d9e0bec.tar.bz2
Fixed potential crash while generating dot graphs
-rw-r--r--src/dot.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 036cc86..f6dc576 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -810,7 +810,11 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args)
bool DotRunner::run()
{
int exitCode=0;
- QCString dotExe = Config_getString("DOT_PATH")+"dot";
+ // we need to use data here to make a copy of the string, as Config_getString can be called by
+ // multiple threads simulaneously and the reference counting is not thread safe.
+ QCString dotExe = Config_getString("DOT_PATH").data();
+ dotExe+="dot";
+
bool multiTargets = Config_getBool("DOT_MULTI_TARGETS");
QCString dotArgs;
QListIterator<QCString> li(m_jobs);