]> cloud.milkyroute.net Git - dolphin.git/commitdiff
versioncontrol: Prevent a use-after-free in UpdateItemStatesThread
authorMéven Car <meven@kde.org>
Sat, 23 Mar 2024 10:55:37 +0000 (11:55 +0100)
committerMéven Car <meven@kde.org>
Sun, 24 Mar 2024 10:55:54 +0000 (11:55 +0100)
UpdateItemStatesThread kept a pointer reference to m_plugin whose
lifetime was tied to VersionControlObserver parents.
On application shutdown it could happen the thread is still running when
the Observer is destroyed.

Make the plugin pointer a weak reference, allowing to stop the thread
when the plugin is gone.

BUG: 477425


No differences found