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

Unified Diff: components/exo/pointer.cc

Issue 2355953003: exo: Fix crash in SetCursor (Closed)
Patch Set: Created 4 years, 3 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
« 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: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 5c22d537ed2c3e959a75370007894ee58d632b45..64d2ae41e57f7971cfb125de6e15f7a65e93dd75 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -72,6 +72,9 @@ void Pointer::SetCursor(Surface* surface, const gfx::Point& hotspot) {
if (!focus_)
return;
+ if (!widget_)
+ CreatePointerWidget();
+
// If surface is different than the current pointer surface then remove the
// current surface and add the new surface.
if (surface != surface_) {
« 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