From eec9ed0bcc0ce97543578e0a3ed8ee60bb473dad Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 7 Jun 2021 15:20:45 -0300 Subject: [PATCH] Fix a couple of minor leaked ui::Messages --- src/app/commands/cmd_keyboard_shortcuts.cpp | 6 +++--- src/app/commands/cmd_options.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index 8767793c8..6f2da2484 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -942,9 +942,9 @@ void KeyboardShortcutsCommand::onExecute(Context* context) // Save preferences in widgets that are bound to options automatically { - Message* msg = new Message(kSavePreferencesMessage); - msg->setPropagateToChildren(msg); - window.sendMessage(msg); + Message msg(kSavePreferencesMessage); + msg.setPropagateToChildren(&msg); + window.sendMessage(&msg); } // Save keyboard shortcuts in configuration file diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index 61f6cb9c3..2eb6f8fc4 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -589,9 +589,9 @@ public: void saveConfig() { // Save preferences in widgets that are bound to options automatically { - Message* msg = new Message(kSavePreferencesMessage); - msg->setPropagateToChildren(msg); - sendMessage(msg); + Message msg(kSavePreferencesMessage); + msg.setPropagateToChildren(&msg); + sendMessage(&msg); } // Update language