AppOutputPane: Ensure the window exists before flushing

Amends c1f6d70445

Change-Id: I5fbb6efced18682b62cd7c905653e23419a3a522
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-07-04 10:55:37 +02:00
parent 5f5a16628b
commit 6e16512eba

View File

@@ -380,7 +380,8 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
QTimer::singleShot(0, this, [this, rc] { runControlFinished(rc); }); QTimer::singleShot(0, this, [this, rc] { runControlFinished(rc); });
for (const RunControlTab &t : std::as_const(m_runControlTabs)) { for (const RunControlTab &t : std::as_const(m_runControlTabs)) {
if (t.runControl == rc) { if (t.runControl == rc) {
t.window->flush(); if (t.window)
t.window->flush();
break; break;
} }
} }