From 117574e3cbe280d5e706840a6c6ab4f95d86538f Mon Sep 17 00:00:00 2001 From: Ye ShanShan Date: Wed, 4 Dec 2024 14:37:16 +0800 Subject: [PATCH] fix: app crashed for DNotitebarWindowHelper DNotitebarWindowHelper is delete by manual instead of Window deleted, so we need to resetVtable. pms: BUG-368399 --- xcb/dnotitlebarwindowhelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xcb/dnotitlebarwindowhelper.cpp b/xcb/dnotitlebarwindowhelper.cpp index 88465c0e..e7377691 100644 --- a/xcb/dnotitlebarwindowhelper.cpp +++ b/xcb/dnotitlebarwindowhelper.cpp @@ -81,6 +81,10 @@ DNoTitlebarWindowHelper::~DNoTitlebarWindowHelper() { g_pressPoint.remove(this); + if (VtableHook::hasVtable(m_window)) { + VtableHook::resetVtable(m_window); + } + mapped.remove(qobject_cast(parent())); if (m_window->handle()) { // 当本地窗口还存在时,移除设置过的窗口属性