Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1780)

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 282693002: Add a null check for PermissionBubbleManager::FromWebcontents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/media_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 0c66018bb3f111b19681930521bd237ab7372659..83562dc48f4f286f01132992f12907f52acf568b 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -75,7 +75,7 @@ const content::MediaStreamDevice* FindDeviceWithId(
}
}
return NULL;
-};
+}
// This is a short-term solution to grant camera and/or microphone access to
// extensions:
@@ -631,8 +631,10 @@ void MediaCaptureDevicesDispatcher::ProcessQueuedAccessRequest(
base::Unretained(this), web_contents)));
if (controller->DismissInfoBarAndTakeActionOnSettings())
return;
- PermissionBubbleManager::FromWebContents(web_contents)->
- AddRequest(controller.release());
+ PermissionBubbleManager* bubble_manager =
+ PermissionBubbleManager::FromWebContents(web_contents);
+ if (bubble_manager)
+ bubble_manager->AddRequest(controller.release());
return;
}
« no previous file with comments | « chrome/browser/media/chrome_midi_permission_context.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698