entry: handle NULL cursor when releasing reference

If we happen to have gotten NULL back for a cursor, then we
need to check before unreffing it.
This commit is contained in:
Christian Hergert 2016-09-27 14:09:02 -07:00
parent 3c775eb2b8
commit 7ecd337877

View File

@ -3364,7 +3364,7 @@ gtk_entry_realize (GtkWidget *widget)
gtk_widget_register_window (widget, priv->text_area);
if (attributes_mask & GDK_WA_CURSOR)
g_object_unref (attributes.cursor);
g_clear_object (&attributes.cursor);
gtk_im_context_set_client_window (priv->im_context, priv->text_area);