diff --git a/kate/ollie_kate.cpp b/kate/ollie_kate.cpp index a104be0..fa7b219 100644 --- a/kate/ollie_kate.cpp +++ b/kate/ollie_kate.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -524,7 +525,10 @@ void OllieKateView::onSessionKilled(const QString &session_id) m_chatView->clear(); m_sessionLabel->setText("No session"); m_cwdLabel->setText(""); - refreshSessions(); + // Defer session switch to let Qt finish processing the D-Bus signal. + // Calling render() synchronously here can crash because the QTextDocument + // is still tearing down resources from the clear() above. + QTimer::singleShot(0, this, &OllieKateView::refreshSessions); } }