[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.
This commit is contained in:
Martin Gräßlin 2015-11-09 09:40:58 +01:00
parent 2867b84101
commit f19fedb0f6

View file

@ -149,9 +149,6 @@ void TestWindowManagement::init()
QVERIFY(serverSurfaceCreated.wait());
m_surfaceInterface = serverSurfaceCreated.first().first().value<KWayland::Server::SurfaceInterface*>();
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;