entry: handle NULL cursor when updating cursors

If we got a NULL cursor from gdk_cursor_new_from_name(), we need
to handle that when unreffing.
This commit is contained in:
Christian Hergert 2016-09-27 14:12:43 -07:00
parent 7ecd337877
commit b684b23c74

View File

@ -3099,7 +3099,7 @@ update_cursors (GtkWidget *widget)
display = gtk_widget_get_display (widget);
cursor = gdk_cursor_new_from_name (display, "text");
gdk_window_set_cursor (icon_info->window, cursor);
g_object_unref (cursor);
g_clear_object (&cursor);
}
else
{