summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandxdgshellv6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandxdgshellv6.cpp')
-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;