Skip to content

Commit bbc510f

Browse files
LFRonBLumia
authored andcommitted
fix: destroy wayland proxy before cleanup to prevent use-after-free crash
Call destroy() on the treeland_foreign_toplevel_handle_v1 proxy before emitting handlerIsDeleted() to stop the compositor from sending further events to a handle scheduled for C++ destruction. Without this, pending state events could arrive after the ForeignToplevelHandle object is freed by QScopedPointer, causing a crash in m_states.append() when activating applications from the system tray.
1 parent 896d829 commit bbc510f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

panels/dock/taskmanager/treelandwindow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ void ForeignToplevelHandle::treeland_foreign_toplevel_handle_v1_done()
108108
}
109109
void ForeignToplevelHandle::treeland_foreign_toplevel_handle_v1_closed()
110110
{
111+
destroy();
111112
Q_EMIT handlerIsDeleted();
112113
}
113114

0 commit comments

Comments
 (0)