Client: Fix memory leak for xdg_popup and xdg_toplevel
Change-Id: I561e2af0cdc812ea4f499525b4af0a4ab7ad8182 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
8ce206f324
commit
0f9595ae09
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user