Skip to content
Browse files
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.

origin commit:
  • Loading branch information
Marek Kasik authored and raveit65 committed Mar 22, 2018
1 parent 8597c1d commit f671e62f59c95301e62c35b2bb2ec4f8f3bdb37f
Showing with 1 addition and 1 deletion.
  1. +1 −1 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))

0 comments on commit f671e62

Please sign in to comment.