fix: NSImageName string conversion (#23467)

This commit is contained in:
Shelley Vohr 2020-05-10 18:24:45 -07:00 committed by GitHub
parent 392ea320cf
commit 6114518463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

View file

@ -2363,7 +2363,7 @@ void WebContents::StartDrag(const gin_helper::Dictionary& item,
}
gin::Handle<NativeImage> icon;
if (!item.Get("icon", &icon)) {
if (!item.Get("icon", &icon) || icon->image().IsEmpty()) {
args->ThrowError("Must specify non-empty 'icon' option");
return;
}