From 73d09c8f7449e505bcfc5a6394702183319a2637 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 28 Sep 2016 12:37:41 -0700 Subject: [PATCH] scrolledwindow: handle NULL cursor safely It's possible to get a NULL cursor back if there are improperly configured or missing cursors on the system. --- gtk/gtkscrolledwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index c4bec8b236..27d5e7bba8 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -3396,7 +3396,7 @@ install_scroll_cursor (GtkScrolledWindow *scrolled_window, display = gdk_window_get_display (priv->scroll_window); cursor = gdk_cursor_new_from_name (display, "all-scroll"); gdk_window_set_cursor (priv->scroll_window, cursor); - g_object_unref (cursor); + g_clear_object (&cursor); } static void