summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorMarek Kasik <[email protected]>2016-08-10 15:16:17 +0200
committermonsta <[email protected]>2018-04-03 17:23:01 +0300
commit4bc8ddd5ef4642ccd4dd07ed9ba94fefd7dd2d2c (patch)
tree9d5bbbdf4c0a72d7f317d450fa1a7d2392c4f2ba /libview
parent7bba877d2283a9bef1beba35e101a279b98b7db7 (diff)
downloadatril-4bc8ddd5ef4642ccd4dd07ed9ba94fefd7dd2d2c.tar.bz2
atril-4bc8ddd5ef4642ccd4dd07ed9ba94fefd7dd2d2c.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
Diffstat (limited to 'libview')
-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 5fbf12ff..c767368e 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3623,7 +3623,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_widget_has_focus (widget)) {