mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 08:05:59 +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();
|
exitFunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& [k, v] : plugin->registeredCallbacks)
|
for (auto& [k, v] : plugin->registeredCallbacks) {
|
||||||
g_pHookSystem->unhook(v);
|
if (const auto SP = v.lock())
|
||||||
|
g_pHookSystem->unhook(SP);
|
||||||
|
}
|
||||||
|
|
||||||
const auto ls = plugin->registeredLayouts;
|
const auto ls = plugin->registeredLayouts;
|
||||||
for (auto& l : ls)
|
for (auto& l : ls)
|
||||||
|
|
Loading…
Reference in a new issue