Fix crash when destroying focus window
Make sure we don't try to disable input for a window that has already been destroyed. Change-Id: I1224599b3c43e2315b3571f01c5896a001614dc4 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
This commit is contained in:
parent
e56040ec7d
commit
d14378ec1c
@ -532,7 +532,8 @@ void QWaylandInputContext::setFocusObject(QObject *)
|
||||
if (mCurrentWindow && mCurrentWindow->handle()) {
|
||||
if (mCurrentWindow.data() != window || !inputMethodAccepted()) {
|
||||
struct ::wl_surface *surface = static_cast<QWaylandWindow *>(mCurrentWindow->handle())->object();
|
||||
textInput()->disable(surface);
|
||||
if (surface)
|
||||
textInput()->disable(surface);
|
||||
mCurrentWindow.clear();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user