summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-10-01 11:03:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-02 10:45:27 +0200
commit8dc8fe53f9b27a27230945a98b08570cfc1b4d0f (patch)
treec6186f3c1e523ae595f3f3d07557a79c3d686ca8 /src/corelib/io
parent5ad1e2578bb3eaa7da6aefa1f96d79947216d509 (diff)
QProcess/Win: fix crash in drainOutputPipes
stdoutReader->waitForReadyRead() can synchronously trigger the deletion of stdoutreader (via signal readyRead(), _q_canReadStandardOutput(), destroyChannel()). Analoguous for stderrReader. Task-number: QTBUG-33730 Change-Id: I8badac53e92a979c437838b2959b4c0445c8de81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 291ea319ec..dba9f62b98 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -654,11 +654,11 @@ bool QProcessPrivate::drainOutputPipes()
bool readOperationActive = false;
if (stdoutReader) {
readyReadEmitted |= stdoutReader->waitForReadyRead(0);
- readOperationActive = stdoutReader->isReadOperationActive();
+ readOperationActive = stdoutReader && stdoutReader->isReadOperationActive();
}
if (stderrReader) {
readyReadEmitted |= stderrReader->waitForReadyRead(0);
- readOperationActive |= stderrReader->isReadOperationActive();
+ readOperationActive |= stderrReader && stderrReader->isReadOperationActive();
}
someReadyReadEmitted |= readyReadEmitted;
if (!readOperationActive || !readyReadEmitted)