diff options
author | Marek Kasik <[email protected]> | 2016-08-10 15:16:17 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-03-22 08:45:27 +0100 |
commit | 3fddbe735f8a06cf528a51c267db8f48eaedff6a (patch) | |
tree | 0cd72c96c680418d2b144c607ee0e82422d82ddd | |
parent | 10d764dae5d02a3c29973ef0aadaa9fdcdd297bd (diff) | |
download | atril-3fddbe735f8a06cf528a51c267db8f48eaedff6a.tar.bz2 atril-3fddbe735f8a06cf528a51c267db8f48eaedff6a.tar.xz |
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
-rw-r--r-- | libview/ev-view.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index 8c7c8520..b513fcbe 100644 --- a/libview/ev-view.c +++ b/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)) |