From fc8cf4426399e320ac64ae117406ab00025e8c0f Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 3 Aug 2018 11:42:19 +0200 Subject: [PATCH] Client: Don't leak toplevels for xdg-shell-unstable-v6 Change-Id: Ifd6d4956eeed663e45219b428dfe562e7a82e626 Reviewed-by: David Edmundson Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp b/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp index 5bcd3b25496..2c910d116f1 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgshellv6.cpp @@ -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;