Handle the case of null surface gracefully. It can be null if the
surface is destroyed on client side and the object is in zombie state
still.
Change-Id: Ife67180e6405a521562a43c24d377559d7848b6f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Q_UNUSED(sy);
QWaylandInputDevice *inputDevice = (QWaylandInputDevice *) data;
- // shouldn't get pointer enter with no surface
- Q_ASSERT(surface);
+ if (!surface)
+ return;
QWaylandWindow *window = (QWaylandWindow *) wl_surface_get_user_data(surface);
window->handleMouseEnter();
inputDevice->mModifiers |= translateModifiers(inputDevice->mXkbState);
#endif
- // shouldn't get keyboard enter with no surface
- Q_ASSERT(surface);
+ if (!surface)
+ return;
window = (QWaylandWindow *) wl_surface_get_user_data(surface);
inputDevice->mKeyboardFocus = window;