summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-02-04 15:12:36 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-02-05 13:43:57 +0000
commitdf3ffeec15cd20c249cb6ffb2d235526a05722a5 (patch)
treeab644e1faa99f1bd74feab140d7500b63e91666a /src/corelib/io/qprocess.cpp
parent6a607aa7aa56ddf4323aa78d64925192494befb8 (diff)
QProcess/Win: fix sporadic crash
QProcessPrivate::_q_processDied() was potentially called twice if there was a slot connected to readyRead() that called processEvents(), because the processFinishedNotifier was still enabled when readyRead() was emitted. This led to a null pointer access in findExitCode. Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28 Task-number: QTBUG-33731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index a234050777..939cecfb44 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1044,9 +1044,9 @@ bool QProcessPrivate::_q_processDied()
return false;
#endif
#ifdef Q_OS_WIN
- drainOutputPipes();
if (processFinishedNotifier)
processFinishedNotifier->setEnabled(false);
+ drainOutputPipes();
#endif
// the process may have died before it got a chance to report that it was