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

Unified Diff: content/browser/media/capture/cursor_renderer_aura.cc

Issue 2466453003: Fix nullptr access in CursorRendererAura::SnapshotCursorState. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/cursor_renderer_aura.cc
diff --git a/content/browser/media/capture/cursor_renderer_aura.cc b/content/browser/media/capture/cursor_renderer_aura.cc
index b4a2ba5a4a10ad734e04bc0fa5a224ea8c98307f..f78e56c3451fe9e8124d31f34d710aec641b5a72 100644
--- a/content/browser/media/capture/cursor_renderer_aura.cc
+++ b/content/browser/media/capture/cursor_renderer_aura.cc
@@ -109,6 +109,11 @@ bool CursorRendererAura::SnapshotCursorState(const gfx::Rect& region_in_frame) {
return false;
}
aura::Window* active_window = activation_client->GetActiveWindow();
+ if (!active_window) {
+ DVLOG(2) << "Skipping update as there is no active window";
+ Clear();
+ return false;
+ }
if (!active_window->Contains(window_)) {
// Return early if the target window is not active.
DVLOG(2) << "Skipping update on an inactive window";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698