Fix crash creating the "No Recent File" w/AppMenuItem() (fix #3371)

This commit is contained in:
David Capello 2022-06-14 14:00:19 -03:00
parent 30b61e501e
commit e2798bc849
2 changed files with 2 additions and 1 deletions

View File

@ -546,7 +546,7 @@ bool AppMenus::rebuildRecentList()
else {
std::unique_ptr<AppMenuItem> menuitem(
new AppMenuItem(
Strings::main_menu_file_no_recent_file(), nullptr));
Strings::main_menu_file_no_recent_file()));
menuitem->setIsRecentFileItem(true);
menuitem->setEnabled(false);

View File

@ -35,6 +35,7 @@ namespace app {
AppMenuItem(const std::string& text,
const std::string& commandId = std::string(),
const Params& params = Params());
AppMenuItem(const std::string& text, std::nullptr_t) = delete;
KeyPtr key() { return m_key; }
void setKey(const KeyPtr& key);