Skip to content

Commit

Permalink
fix: app.dock.setIcon() crash before app ready (#36279)
Browse files Browse the repository at this point in the history
fix: dock.setIcon() crash before app ready
  • Loading branch information
codebytere committed Nov 9, 2022
1 parent 5fc3ed9 commit 1b1609a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shell/browser/browser_mac.mm
Expand Up @@ -447,6 +447,13 @@
image = native_image->image();
}

// This is needed when this fn is called before the browser
// process is ready, since supported scales are normally set
// by ui::ResourceBundle::InitSharedInstance
// during browser process startup.
if (!is_ready())
gfx::ImageSkia::SetSupportedScales({1.0f});

[[AtomApplication sharedApplication]
setApplicationIconImage:image.AsNSImage()];
}
Expand Down

0 comments on commit 1b1609a

Please sign in to comment.