From f671e62f59c95301e62c35b2bb2ec4f8f3bdb37f Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 10 Aug 2016 15:16:17 +0200 Subject: libview: Check number of pages when processing button events Check whether there are some pages in the opened document when processing button events to avoid crash. https://bugzilla.gnome.org/show_bug.cgi?id=769700 origin commit: https://git.gnome.org/browse/evince/commit/?id=f30aed7 --- libview/ev-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libview/ev-view.c b/libview/ev-view.c index 8c7c8520..b513fcbe 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -4436,7 +4436,7 @@ ev_view_button_press_event (GtkWidget *widget, { EvView *view = EV_VIEW (widget); - if (!view->document) + if (!view->document || ev_document_get_n_pages (view->document) <= 0) return FALSE; if (gtk_gesture_is_recognized (view->zoom_gesture)) -- cgit v1.2.1