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:
parent
2582e8561c
commit
3d12cb2c64
1 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue