handle empty menu-relative shortcut paths

This commit is contained in:
mjk 2021-03-20 17:28:26 +00:00 committed by LAGonauta
parent f1bcb6604f
commit e8d84d2eda

View file

@ -99,6 +99,9 @@ private:
bool ImplEnsureAumiddedShortcutExists( bool ImplEnsureAumiddedShortcutExists(
const std::string_view menu_rel_path, const std::string_view narrow_aumid) const std::string_view menu_rel_path, const std::string_view narrow_aumid)
{ {
if (menu_rel_path.empty())
throw std::runtime_error{"empty menu-relative shortcut path"};
const auto aumid = sview_to_wstr(narrow_aumid); const auto aumid = sview_to_wstr(narrow_aumid);
if (aumid.empty()) if (aumid.empty())
{ {