pluginsystem: fix crash when unloading plugin hyprctl commands (#12821)
This commit is contained in:
parent
17bc3b83db
commit
922e53c68c
3 changed files with 6 additions and 4 deletions
|
|
@ -407,7 +407,7 @@ APICALL bool HyprlandAPI::unregisterHyprCtlCommand(HANDLE handle, SP<SHyprCtlCom
|
|||
if (!PLUGIN)
|
||||
return false;
|
||||
|
||||
std::erase(PLUGIN->m_registeredHyprctlCommands, cmd);
|
||||
std::erase_if(PLUGIN->m_registeredHyprctlCommands, [&](const auto& other) { return !other || other == cmd; });
|
||||
g_pHyprCtl->unregisterCommand(cmd);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue