Fix a couple of minor leaked ui::Messages

This commit is contained in:
David Capello 2021-06-07 15:20:45 -03:00
parent b02fc43506
commit eec9ed0bcc
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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