[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:
parent
2867b84101
commit
f19fedb0f6
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue