From 946b1c8d7815690b4a4810bd075e0f69faa9e83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 14 Jun 2015 05:48:36 +0200 Subject: [PATCH] Fix 3e53a6283d5509de0a3bede54e21ef5ea9da2b2e The most trivial changes are the one which needs to be tested! --- src/wayland/seat_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 592d21e0a9..8c7810a7f8 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -486,7 +486,7 @@ void SeatInterface::setFocusedPointerSurface(SurfaceInterface *surface, const QP d->globalPointer.focus = Private::Pointer::Focus(); d->globalPointer.focus.surface = surface; PointerInterface *p = d->pointerForSurface(surface); - if (!p->resource()) { + if (p && !p->resource()) { p = nullptr; } d->globalPointer.focus.pointer = p; @@ -667,7 +667,7 @@ void SeatInterface::setFocusedKeyboardSurface(SurfaceInterface *surface) d->keys.focus = Private::Keyboard::Focus(); d->keys.focus.surface = surface; KeyboardInterface *k = d->keyboardForSurface(surface); - if (!k->resource()) { + if (k && !k->resource()) { k = nullptr; } d->keys.focus.keyboard = k; @@ -831,7 +831,7 @@ void SeatInterface::setFocusedTouchSurface(SurfaceInterface *surface, const QPoi d->touchInterface.focus.surface = surface; d->touchInterface.focus.offset = surfacePosition; TouchInterface *t = d->touchForSurface(surface); - if (!t->resource()) { + if (t && !t->resource()) { t = nullptr; } d->touchInterface.focus.touch = t;