Skip to content

Commit f671e62

Browse files
MarekKasikraveit65
authored andcommitted
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
1 parent 8597c1d commit f671e62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libview/ev-view.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4436,7 +4436,7 @@ ev_view_button_press_event (GtkWidget *widget,
44364436
{
44374437
EvView *view = EV_VIEW (widget);
44384438

4439-
if (!view->document)
4439+
if (!view->document || ev_document_get_n_pages (view->document) <= 0)
44404440
return FALSE;
44414441

44424442
if (gtk_gesture_is_recognized (view->zoom_gesture))

0 commit comments

Comments
 (0)