parent
14f9f4c468
commit
377e09abd9
|
@ -127,10 +127,13 @@ void HookManager::run_hook(StringView hook_name, StringView param, Context& cont
|
||||||
if (to_run.hook->flags & HookFlags::Once)
|
if (to_run.hook->flags & HookFlags::Once)
|
||||||
{
|
{
|
||||||
auto it = find(hook_list->value, to_run.hook);
|
auto it = find(hook_list->value, to_run.hook);
|
||||||
|
if (it != hook_list->value.end())
|
||||||
|
{
|
||||||
m_hooks_trash.push_back(std::move(*it));
|
m_hooks_trash.push_back(std::move(*it));
|
||||||
hook_list->value.erase(it);
|
hook_list->value.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (runtime_error& err)
|
catch (runtime_error& err)
|
||||||
{
|
{
|
||||||
hook_error = true;
|
hook_error = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user