diff --git a/ext/libstrawberry-common/core/workerpool.h b/ext/libstrawberry-common/core/workerpool.h index 4c23660c..ff453212 100644 --- a/ext/libstrawberry-common/core/workerpool.h +++ b/ext/libstrawberry-common/core/workerpool.h @@ -374,8 +374,9 @@ void WorkerPool::ProcessReadyReadStandardOutput() { Q_ASSERT(QThread::currentThread() == thread()); QProcess *process = qobject_cast(sender()); + QByteArray data = process->readAllStandardOutput(); - fprintf(stdout, "%s", process->readAllStandardOutput().data()); + fprintf(stdout, "%s", data.data()); fflush(stdout); } @@ -386,8 +387,9 @@ void WorkerPool::ProcessReadyReadStandardError() { Q_ASSERT(QThread::currentThread() == thread()); QProcess *process = qobject_cast(sender()); + QByteArray data = process->readAllStandardError(); - fprintf(stderr, "%s", process->readAllStandardError().data()); + fprintf(stderr, "%s", data.data()); fflush(stderr); }