Avoid potential use after free of the mode name
This can be an issue with NextKey that now does not have a static mode name.
This commit is contained in:
parent
586f79c30d
commit
95606d2336
|
@ -1596,6 +1596,7 @@ void InputHandler::pop_mode(InputMode* mode)
|
|||
kak_assert(m_mode_stack.back().get() == mode);
|
||||
kak_assert(m_mode_stack.size() > 1);
|
||||
|
||||
RefPtr<InputMode> keep_alive{mode}; // Ensure prev_name stays valid
|
||||
StringView prev_name = mode->name();
|
||||
|
||||
current_mode().on_disabled(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user