fontchooser: Fix up the previous commit
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jan 2020 20:42:01 +0000 (15:42 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jan 2020 20:42:01 +0000 (15:42 -0500)
gtk/gtkfontchooserwidget.c

index 686a8de13ac007c1eb85037d2d6cde2f4bf66edc..0ad56e8318393a2986ab56dc4b85c00339492171 100644 (file)
@@ -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);