Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2007-01-28 20:52:01 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2007-01-28 20:52:01 (GMT)
commit79c7d48b7ac6b6549bcb91aa6a310ecf6d3d54e3 (patch)
tree837d55128a29ec711c28e7872a3136f695c685d0 /shell
parentce6aa52294383602f93b658c5aaca550351120df (diff)
Check if document have links model
svn path=/trunk/; revision=2266
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 2094b86..325d916 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -705,16 +705,20 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
find_task.page_label = page_label;
find_task.chapter = NULL;
- if (EV_IS_DOCUMENT_LINKS (window->priv->document)) {
+ if (EV_IS_DOCUMENT_LINKS (window->priv->document) &&
+ ev_document_links_has_document_links (EV_DOCUMENT_LINKS (window->priv->document))) {
GtkTreeModel *model;
g_object_get (G_OBJECT (window->priv->sidebar_links), "model", &model, NULL);
- gtk_tree_model_foreach (model,
- ev_window_find_chapter,
- &find_task);
+ if (model) {
+
+ gtk_tree_model_foreach (model,
+ ev_window_find_chapter,
+ &find_task);
- g_object_unref (model);
+ g_object_unref (model);
+ }
}
if (find_task.chapter)