From: Martin Kretzschmar Date: Fri, 4 Feb 2005 12:15:13 +0000 (+0000) Subject: (ev_sidebar_thumbnails_select_page): do nothing unless we have a X-Git-Tag: EVINCE_0_1_3~6 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=826131fb75fadb602b375ba29e593d1e0ab3dde8;p=evince.git (ev_sidebar_thumbnails_select_page): do nothing unless we have a document. Prevents warning from scroll_to_cell. --- diff --git a/ChangeLog b/ChangeLog index 64c5a549..49411dd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-04 Martin Kretzschmar + + * shell/ev-sidebar-thumbnails.c + (ev_sidebar_thumbnails_select_page): do nothing unless we have a + document. Prevents warning from scroll_to_cell. + 2005-02-02 Kjartan Maraas * configure.ac: Add «nb» to ALL_LINGUAS too. diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 2d715398..382a5a96 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -312,6 +312,10 @@ ev_sidebar_thumbnails_select_page (EvSidebarThumbnails *sidebar, GtkTreePath *path; GtkTreeSelection *selection; + /* if the EvSidebar's document can't provide thumbnails */ + if (sidebar->priv->document == NULL) + return; + path = gtk_tree_path_new_from_indices (page - 1, -1); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar->priv->tree_view));