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

https://bugzilla.gnome.org/show_bug.cgi?id=769700

origin commit:
https://git.gnome.org/browse/evince/commit/?id=f30aed7
  • Loading branch information...
Marek Kasik authored and raveit65 committed Aug 10, 2016
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.
You can’t perform that action at this time.