[gnome-photos] preview-nav-buttons: Skip invalid paths
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] preview-nav-buttons: Skip invalid paths
- Date: Fri, 26 Sep 2014 16:06:39 +0000 (UTC)
commit 113d48bc7ea6a3cc7e40bd2fec1e6a85684e942f
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Sep 26 17:01:54 2014 +0200
preview-nav-buttons: Skip invalid paths
Now that we can quickly navigate through a bunch of slow loading items
in the preview (due to the spinner being overlaid), we can hit an
invalid path towards the beginning or end of the model.
Fixes: https://bugzilla.gnome.org/737425
src/photos-preview-nav-buttons.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index e10b9d7..b45f4f5 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -263,7 +263,9 @@ photos_preview_nav_buttons_set_active_path (PhotosPreviewNavButtons *self)
PhotosBaseItem *item;
gchar *id;
- gtk_tree_model_get_iter (priv->model, &iter, priv->current_path);
+ if (!gtk_tree_model_get_iter (priv->model, &iter, priv->current_path))
+ return;
+
gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (priv->model), &child_iter, &iter);
child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (priv->model));
gtk_tree_model_get (child_model, &child_iter, PHOTOS_VIEW_MODEL_URN, &id, -1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]