From f19fedb0f63f60885d5a41c43c5e6388090b7681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 9 Nov 2015 09:40:58 +0100 Subject: [PATCH] [autotests] Cleanup surface handling in TestWindowManagement For some reason two surfaces were created and the surface not cleaned up before the connection thread exits. This caused ASAN to complain. --- .../autotests/client/test_wayland_windowmanagement.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp index 85316298ed..9f259cabfe 100644 --- a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp +++ b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp @@ -149,9 +149,6 @@ void TestWindowManagement::init() QVERIFY(serverSurfaceCreated.wait()); m_surfaceInterface = serverSurfaceCreated.first().first().value(); QVERIFY(m_surfaceInterface); - - m_surface = m_compositor->createSurface(this); - QVERIFY(m_surface); } void TestWindowManagement::testWindowTitle() @@ -192,6 +189,10 @@ void TestWindowManagement::cleanup() delete m_surfaceInterface; m_surfaceInterface = nullptr; + if (m_surface) { + delete m_surface; + m_surface = nullptr; + } if (m_compositor) { delete m_compositor; m_compositor = nullptr;