FileChooserButton: Avoid unref()ing a null model

Otherwise simply closing the widget-factory would give a critical from
g_object_unref().
This commit is contained in:
Daniel Boles
2017-10-06 21:34:03 +01:00
parent b94bfb1678
commit b45aa63b75

View File

@@ -994,7 +994,8 @@ gtk_file_chooser_button_finalize (GObject *object)
if (priv->current_folder_while_inactive)
g_object_unref (priv->current_folder_while_inactive);
g_object_unref (priv->model);
if (priv->model != NULL)
g_object_unref (priv->model);
G_OBJECT_CLASS (gtk_file_chooser_button_parent_class)->finalize (object);
}