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 10d764d commit 3fddbe735f8a06cf528a51c267db8f48eaedff6a
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 3fddbe7

Please sign in to comment.