mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibGUI: Fix Action destructor to unregister itself correctly
Changed the Action destructor to fix an issue where global scoped actions without shortcuts were not being properly unregistered from the application. Previously, this could cause crashes when attempting to open the command palette.
This commit is contained in:
parent
2df25f8edf
commit
d50b4f3581
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ Action::Action(DeprecatedString text, Shortcut const& shortcut, Shortcut const&
|
|||
|
||||
Action::~Action()
|
||||
{
|
||||
if (m_shortcut.is_valid() && m_scope == ShortcutScope::ApplicationGlobal) {
|
||||
if (m_scope == ShortcutScope::ApplicationGlobal) {
|
||||
if (auto* app = Application::the())
|
||||
app->unregister_global_shortcut_action({}, *this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue