Client: Don't leak toplevels for xdg-shell-unstable-v6

Change-Id: Ifd6d4956eeed663e45219b428dfe562e7a82e626
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-08-03 11:42:19 +02:00 committed by Johan Helsing
parent 019427b9ae
commit fc8cf44263

View File

@ -136,8 +136,10 @@ QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_sur
QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
{
if (m_toplevel)
zxdg_toplevel_v6_destroy(m_toplevel->object());
if (m_toplevel) {
delete m_toplevel;
m_toplevel = nullptr;
}
if (m_popup) {
delete m_popup;
m_popup = nullptr;