summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-08-03 11:42:19 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-08-08 11:23:34 +0000
commitbbd16989e07d6da367f71a4c36234409bf018287 (patch)
treebc7d705255b0bf05597a1ab88ef33f6d690142ea
parent3c072f46b17a195daf1901d0c9f9410b4007b0a7 (diff)
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>
-rw-r--r--src/client/qwaylandxdgshellv6.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp
index 5bcd3b254..2c910d116 100644
--- a/src/client/qwaylandxdgshellv6.cpp
+++ b/src/client/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;