mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:05:58 +01:00
pluginsystem: fix unhooking on exit
This commit is contained in:
parent
e91513a5e8
commit
dafc9ed4eb
1 changed files with 4 additions and 2 deletions
|
@ -96,8 +96,10 @@ void CPluginSystem::unloadPlugin(const CPlugin* plugin, bool eject) {
|
|||
exitFunc();
|
||||
}
|
||||
|
||||
for (auto& [k, v] : plugin->registeredCallbacks)
|
||||
g_pHookSystem->unhook(v);
|
||||
for (auto& [k, v] : plugin->registeredCallbacks) {
|
||||
if (const auto SP = v.lock())
|
||||
g_pHookSystem->unhook(SP);
|
||||
}
|
||||
|
||||
const auto ls = plugin->registeredLayouts;
|
||||
for (auto& l : ls)
|
||||
|
|
Loading…
Reference in a new issue