We must do something otherwise the next inputDevice->mouseFocus() call
will dereference an already deleted instance.
Change-Id: I3ac92a37715f63c6dc43191968a8da51befbccde
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
void Compositor::surfaceDestroyed(Surface *surface)
{
+ if (defaultInputDevice()->mouseFocus() == surface)
+ defaultInputDevice()->setMouseFocus(0, QPoint(), QPoint());
m_surfaces.removeOne(surface);
m_dirty_surfaces.remove(surface);
if (m_directRenderSurface == surface)