From 50f82c94b9bf1ff982f9ddd8b9a88fb91d9e0bec Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 9 Jan 2015 19:28:36 +0100 Subject: Fixed potential crash while generating dot graphs --- src/dot.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 li(m_jobs); -- cgit v0.12