From 922e53c68c32a030c410781829e5e3acab5d7762 Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Sat, 3 Jan 2026 22:11:05 +0100 Subject: pluginsystem: fix crash when unloading plugin hyprctl commands (#12821) --- src/plugins/PluginAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/PluginAPI.cpp') diff --git a/src/plugins/PluginAPI.cpp b/src/plugins/PluginAPI.cpp index 1d6586aa..2abddc90 100644 --- a/src/plugins/PluginAPI.cpp +++ b/src/plugins/PluginAPI.cpp @@ -407,7 +407,7 @@ APICALL bool HyprlandAPI::unregisterHyprCtlCommand(HANDLE handle, SPm_registeredHyprctlCommands, cmd); + std::erase_if(PLUGIN->m_registeredHyprctlCommands, [&](const auto& other) { return !other || other == cmd; }); g_pHyprCtl->unregisterCommand(cmd); return true; -- cgit v1.2.3