mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 21:27:20 +03:00
pluginsystem: fix unhooking on exit
This commit is contained in:
parent
e91513a5e8
commit
dafc9ed4eb
@ -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 New Issue
Block a user