[gtk] fontchooser: Fix up the previous commit



commit 34f1ae8fadbf493bb3579438de88cb315ef91b88
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 14 15:42:01 2020 -0500

    fontchooser: Fix up the previous commit

 gtk/gtkfontchooserwidget.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index 686a8de13a..0ad56e8318 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -716,7 +716,8 @@ gtk_font_chooser_widget_dispose (GObject *object)
   GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (object);
   GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self);
 
-  gtk_tree_view_set_model (GTK_TREE_VIEW (priv->family_face_list), NULL);
+  if (priv->family_face_list)
+    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->family_face_list), NULL);
   g_clear_pointer (&priv->stack, gtk_widget_unparent);
 
   G_OBJECT_CLASS (gtk_font_chooser_widget_parent_class)->dispose (object);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]