[gtk+] FileChooserButton: Avoid unref()ing a null model
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] FileChooserButton: Avoid unref()ing a null model
- Date: Fri, 6 Oct 2017 23:47:20 +0000 (UTC)
commit c1a5afb3a824bd0691484be72f534d2f0ba6ef22
Author: Daniel Boles <dboles src gmail com>
Date: Sat Oct 7 00:09:09 2017 +0100
FileChooserButton: Avoid unref()ing a null model
gtk/gtkfilechooserbutton.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index abc6147..c5b58a5 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1061,7 +1061,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)
+ g_object_unref (priv->model);
gtk_widget_unparent (priv->button);
gtk_widget_unparent (priv->combo_box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]