]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-navigation-action.c
Use cairo image surfaces instead of GDK pixbufs for drawing pages and
[evince.git] / shell / ev-navigation-action.c
index 9da89f993c10149f9248799ecdecc8cbb51ef35a..3aa1bea921840a63377b805c09e3ea07f5d2c1d4 100644 (file)
@@ -134,12 +134,12 @@ build_menu (EvNavigationAction *action)
        EvHistory *history = action->priv->history;
        int start, end, i;
 
-       menu = GTK_MENU_SHELL (gtk_menu_new ());
-
-       if (history == NULL) {
-               return GTK_WIDGET (menu);
+       if (history == NULL || ev_history_get_n_links (history) <= 0) {
+               return NULL;
        }
 
+       menu = GTK_MENU_SHELL (gtk_menu_new ());
+
        start = 0;
        end = ev_history_get_n_links (history);