diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-08-03 11:30:33 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-08-08 11:53:39 +0000 |
commit | 985cf4667e68a32e9a32d295c5cb9f74f6a24bf1 (patch) | |
tree | 77826deb8789d137d02b0b2e961739b8f828491d /src/plugins/shellintegration | |
parent | a3f1536963c44c0aba684881cbcf3107f16e9aaf (diff) |
Client: Fix memory leak for xdg_popup and xdg_toplevel
Change-Id: I561e2af0cdc812ea4f499525b4af0a4ab7ad8182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins/shellintegration')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index cab7dc08e..eac33aa7a 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -190,10 +190,14 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *s QWaylandXdgSurface::~QWaylandXdgSurface() { - if (m_toplevel) - xdg_toplevel_destroy(m_toplevel->object()); - if (m_popup) - xdg_popup_destroy(m_popup->object()); + if (m_toplevel) { + delete m_toplevel; + m_toplevel = nullptr; + } + if (m_popup) { + delete m_popup; + m_popup = nullptr; + } destroy(); } |