[gtk/wip/baedert/parser: 72/73] filechooserwidget: Avoid criticals when in recent mode



commit 52c866490f2450a7a10ab1dd338d230567cc31d5
Author: Timm Bäder <mail baedert org>
Date:   Thu Feb 20 11:59:56 2020 +0100

    filechooserwidget: Avoid criticals when in recent mode
    
    Don't try to use the browse_files_model just because we have a location
    entry. The model might still be NULL at this point.

 gtk/gtkfilechooserwidget.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 73a69626ee..8e50026f73 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -7169,7 +7169,8 @@ list_selection_changed (GtkTreeSelection     *selection,
   if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == NULL)
     return;
 
-  if (priv->location_entry)
+  if (priv->location_entry &&
+      priv->browse_files_model)
     update_chooser_entry (impl);
 
   location_bar_update (impl);


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