From e8d84d2eda31ec52d7472a1cf5fcaaf965bcb58f Mon Sep 17 00:00:00 2001 From: mjk Date: Sat, 20 Mar 2021 17:28:26 +0000 Subject: [PATCH] handle empty menu-relative shortcut paths --- plugins/windows-notification/api/src/shortcutcreator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/windows-notification/api/src/shortcutcreator.cpp b/plugins/windows-notification/api/src/shortcutcreator.cpp index d51141f0..340c4b1c 100644 --- a/plugins/windows-notification/api/src/shortcutcreator.cpp +++ b/plugins/windows-notification/api/src/shortcutcreator.cpp @@ -99,6 +99,9 @@ private: bool ImplEnsureAumiddedShortcutExists( 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); if (aumid.empty()) {