[gtk+] entry: handle NULL cursor when updating cursors
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: handle NULL cursor when updating cursors
- Date: Tue, 27 Sep 2016 21:13:29 +0000 (UTC)
commit b684b23c74202cd78dcc1885effcb30c97bea9d8
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 27 14:12:43 2016 -0700
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.
gtk/gtkentry.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index cfe79a7..79588a1 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]