Commit 1d09b45a authored by denniskempin's avatar denniskempin Committed by Commit bot

exo: Fix crash in SetCursor

SetCursor can crash in rare circumstances when no event has been
processed yet, but SetCursor is called by the client.
Adds line to initialize the cursor widget if it does not exist.

BUG=chromium:648724
TEST=none

Review-Url: https://codereview.chromium.org/2355953003
Cr-Commit-Position: refs/heads/master@{#419947}
parent f89757bc
......@@ -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_) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment