fixed memory leak in EventMappingWidget

This commit is contained in:
thrust26 2021-01-13 22:30:40 +01:00
parent 6187d3b542
commit 489188a2e2
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
addFocusWidget(myComboButton);
VariantList combolist = instance().eventHandler().getComboList(mode);
myComboDialog = new ComboDialog(boss, font, combolist);
myComboDialog = make_unique<ComboDialog>(boss, font, combolist);
}
// Show message for currently selected event

View File

@ -90,7 +90,7 @@ class EventMappingWidget : public Widget, public CommandSender
StringListWidget* myActionsList{nullptr};
EditTextWidget* myKeyMapping{nullptr};
ComboDialog* myComboDialog{nullptr};
unique_ptr<ComboDialog> myComboDialog;
// Since this widget can be used for different collections of events,
// we need to specify exactly which group of events we are remapping