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

* fix: crash parsing CLSID in shell.readShortcutLink

* fix: ignore clsid if it could not be set
This commit is contained in:
David Lönnhager 2025-01-27 21:22:56 +01:00 committed by GitHub
parent 4629e449a9
commit ae56a03e33
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