From 8549abaa95159af4e922ff927f90e3a83536028d Mon Sep 17 00:00:00 2001 From: Marwan Tanager Date: Fri, 14 Jun 2013 20:15:08 +0200 Subject: [PATCH] Fix the segfault that happens when jumping while the jumplist is initially empty. Signed-off-by: Sebastian Ramacher --- shortcuts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shortcuts.c b/shortcuts.c index cf916dd..9776901 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -721,6 +721,7 @@ sc_jumplist(girara_session_t* session, girara_argument_t* argument, zathura_t* zathura = session->global.data; g_return_val_if_fail(argument != NULL, false); g_return_val_if_fail(zathura->document != NULL, false); + g_return_val_if_fail(zathura->jumplist.size != 0, false); const double scale = zathura_document_get_scale(zathura->document); double x = gtk_adjustment_get_value(gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view))) / scale;