Skip to content

Commit

Permalink
libview: Check number of pages when processing button events
Browse files Browse the repository at this point in the history
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
MarekKasik authored and raveit65 committed Mar 22, 2018
1 parent 10d764d commit 3fddbe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libview/ev-view.c
Expand Up @@ -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))
Expand Down

0 comments on commit 3fddbe7

Please sign in to comment.