From 1e3b3d6208a4edae04f6e3bb478a483c68972efc Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Fri, 15 Aug 2014 19:38:13 +0300 Subject: 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/client/mockcompositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/client') diff --git a/tests/auto/client/mockcompositor.cpp b/tests/auto/client/mockcompositor.cpp index cfaa34788..bb4f10fd9 100644 --- a/tests/auto/client/mockcompositor.cpp +++ b/tests/auto/client/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) -- cgit v1.2.3