From d9ba141df923049b3cf7e5cc91b2bf4898ddf16b Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Fri, 15 Aug 2014 19:38:13 +0300 Subject: [PATCH] Fix possible crash of the test client The cursor surface is not in the surfaces list when destroyed Change-Id: Ie29224679776d0abec7862d2976be892c63521a7 Reviewed-by: Robin Burchell --- tests/auto/wayland/mockcompositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/wayland/mockcompositor.cpp b/tests/auto/wayland/mockcompositor.cpp index cfaa3478800..bb4f10fd942 100644 --- a/tests/auto/wayland/mockcompositor.cpp +++ b/tests/auto/wayland/mockcompositor.cpp @@ -291,7 +291,7 @@ void Compositor::addSurface(Surface *surface) void Compositor::removeSurface(Surface *surface) { - m_surfaces.remove(m_surfaces.indexOf(surface)); + m_surfaces.removeOne(surface); if (m_keyboard->focus() == surface) m_keyboard->setFocus(0); if (m_pointer->focus() == surface)