diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 8d53be8c42..a0c41fb7b3 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -804,7 +804,9 @@ void AtSpiAdaptor::windowActivated(QObject* window, bool active) return; QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window); - Q_ASSERT(iface); + // If the window has been quickly activated or disabled, it will cause a crash. + if (iface == nullptr) + return; Q_ASSERT(!active || iface->isValid()); QString windowTitle;