fix: crash parsing CLSID in shell.readShortcutLink() (#45348)

* fix: crash parsing CLSID in shell.readShortcutLink

Co-authored-by: David Lönnhager <david.l@mullvad.net>

* fix: ignore clsid if it could not be set

Co-authored-by: David Lönnhager <david.l@mullvad.net>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Lönnhager <david.l@mullvad.net>
This commit is contained in:
trop[bot] 2025-02-20 20:21:35 -05:00 committed by GitHub
parent 5a641e02ee
commit 02b85f1e6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 1 deletions

View file

@ -163,7 +163,8 @@ v8::Local<v8::Value> ReadShortcutLink(gin_helper::ErrorThrower thrower,
options.Set("icon", properties.icon);
options.Set("iconIndex", properties.icon_index);
options.Set("appUserModelId", properties.app_id);
options.Set("toastActivatorClsid", properties.toast_activator_clsid);
if (properties.options & ShortcutProperties::PROPERTIES_TOAST_ACTIVATOR_CLSID)
options.Set("toastActivatorClsid", properties.toast_activator_clsid);
return gin::ConvertToV8(thrower.isolate(), options);
}
#endif