summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Kasik <[email protected]>2016-08-10 15:16:17 +0200
committerraveit65 <[email protected]>2018-03-22 08:27:44 +0100
commitf671e62f59c95301e62c35b2bb2ec4f8f3bdb37f (patch)
tree93cd635f65c8ffe70502b2269053f942bdfacb1f
parent8597c1df89e46c82ca7bc76eb2d1af3ac03d7141 (diff)
downloadatril-f671e62f59c95301e62c35b2bb2ec4f8f3bdb37f.tar.bz2
atril-f671e62f59c95301e62c35b2bb2ec4f8f3bdb37f.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.c2
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))