Skip to content

Commit

Permalink
fix: crash when application launched from UNUserNotificationCenter no…
Browse files Browse the repository at this point in the history
…tification (#25738)

Co-authored-by: Milan Burda <milan.burda@gmail.com>
  • Loading branch information
trop[bot] and miniak committed Oct 2, 2020
1 parent 71c26da commit 5eb225b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell/browser/mac/electron_application_delegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ - (void)applicationWillFinishLaunching:(NSNotification*)notify {

- (void)applicationDidFinishLaunching:(NSNotification*)notify {
NSUserNotification* user_notification =
[notify userInfo][(id) @"NSApplicationLaunchUserNotificationKey"];
[notify userInfo][NSApplicationLaunchUserNotificationKey];

if (user_notification.userInfo) {
if ([user_notification isKindOfClass:[NSUserNotification class]]) {
electron::Browser::Get()->DidFinishLaunching(
electron::NSDictionaryToDictionaryValue(user_notification.userInfo));
} else {
Expand Down

0 comments on commit 5eb225b

Please sign in to comment.