mirror of
https://github.com/electron/electron.git
synced 2026-01-28 16:58:21 -05:00
Don't crash when HTML notifications are used on Windows
Eventually we'll implement real support for this, but for now not crashing is more important.
This commit is contained in:
@@ -60,14 +60,20 @@ void BrowserClient::ShowDesktopNotification(
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
bool worker) {
|
||||
notification_presenter()->ShowNotification(params, render_process_id, render_view_id);
|
||||
auto presenter = notification_presenter();
|
||||
if (!presenter)
|
||||
return;
|
||||
presenter->ShowNotification(params, render_process_id, render_view_id);
|
||||
}
|
||||
|
||||
void BrowserClient::CancelDesktopNotification(
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
int notification_id) {
|
||||
notification_presenter()->CancelNotification(render_process_id, render_view_id, notification_id);
|
||||
auto presenter = notification_presenter();
|
||||
if (!presenter)
|
||||
return;
|
||||
presenter->CancelNotification(render_process_id, render_view_id, notification_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user