[gnome-photos] preview-nav-buttons: Don't touch the path if there is no model



commit 24f90ef2b8a6b4b6a090b503c6e60ea92d2078af
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Oct 26 14:36:15 2015 +0100

    preview-nav-buttons: Don't touch the path if there is no model
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733660

 src/photos-preview-nav-buttons.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index d971648..c78a895 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -527,7 +527,7 @@ photos_preview_nav_buttons_set_model (PhotosPreviewNavButtons *self,
     priv->model = photos_preview_model_new (child_model);
 
   g_clear_pointer (&priv->current_path, (GDestroyNotify) gtk_tree_path_free);
-  if (current_child_path != NULL)
+  if (child_model != NULL && current_child_path != NULL)
     {
       priv->current_path = gtk_tree_model_filter_convert_child_path_to_path (GTK_TREE_MODEL_FILTER 
(priv->model),
                                                                              current_child_path);


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