From 89113e3d938ce5ffa8acafc950b5804b994fb9a7 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 24 Apr 2014 01:42:46 +0200 Subject: [PATCH] Fix cb_jumplist_change Signed-off-by: Sebastian Ramacher --- config.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config.c b/config.c index 7216647..728bf28 100644 --- a/config.c +++ b/config.c @@ -31,17 +31,15 @@ cb_jumplist_change(girara_session_t* session, const char* name, g_return_if_fail(name != NULL); zathura_t* zathura = session->global.data; - if (g_strcmp0(name, "jumplist-size") != 0) { - return; - } - if (*(int *)value < 0) { zathura->jumplist.max_size = 0; } else { zathura->jumplist.max_size = *(int *)value; } - zathura_jumplist_trim(zathura); + if (zathura->jumplist.list != NULL && zathura->jumplist.size != 0) { + zathura_jumplist_trim(zathura); + } } static void