[evince] libview: Check number of pages when processing button events
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Check number of pages when processing button events
- Date: Sat, 3 Sep 2016 06:35:47 +0000 (UTC)
commit f30aed7dbfb82a0d7d78f3c5c9b54f39b1316e6c
Author: Marek Kasik <mkasik redhat com>
Date: Wed Aug 10 15:16:17 2016 +0200
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
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 2361958..9f0c866 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4993,7 +4993,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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]