summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 2db5578..08c0d4f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -258,11 +258,15 @@ void RenderWidgetHostViewGtk::UpdateCursor(const WebCursor& cursor) {
// non-pixmap branch.
if (new_cursor_type == current_cursor_type)
return;
- gdk_cursor = gdk_cursor_new(new_cursor_type);
+ if (new_cursor_type == GDK_LAST_CURSOR)
+ gdk_cursor = NULL;
+ else
+ gdk_cursor = gdk_cursor_new(new_cursor_type);
}
gdk_window_set_cursor(view_.get()->window, gdk_cursor);
// The window now owns the cursor.
- gdk_cursor_unref(gdk_cursor);
+ if (gdk_cursor)
+ gdk_cursor_unref(gdk_cursor);
}
void RenderWidgetHostViewGtk::UpdateCursorIfOverSelf() {