Avoid crash after reloading document

Resolves: #1203277
This commit is contained in:
Martin Hatina 2015-06-22 11:13:03 +02:00
parent 2f51351680
commit 4d4b59ee3c
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c
index 7805219..c871ff9 100644
--- a/libview/ev-view-accessible.c
+++ b/libview/ev-view-accessible.c
@@ -578,7 +578,7 @@ ev_view_accessible_set_page_range (EvViewAccessible *accessible,
g_return_if_fail (EV_IS_VIEW_ACCESSIBLE (accessible));
for (i = accessible->priv->start_page; i <= accessible->priv->end_page; i++) {
- if (i < start || i > end) {
+ if ((i < start || i > end) && i < ev_view_accessible_get_n_pages (accessible)) {
page = g_ptr_array_index (accessible->priv->children, i);
atk_object_notify_state_change (page, ATK_STATE_SHOWING, FALSE);
}

View File

@ -5,7 +5,7 @@
Name: evince
Version: 3.14.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Document viewer
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
@ -13,6 +13,7 @@ Group: Applications/Publishing
URL: http://projects.gnome.org/evince/
Source0: http://download.gnome.org/sources/%{name}/3.14/%{name}-%{version}.tar.xz
Patch0: 0001-Check-for-failed-rendering-jobs.patch
Patch1: evince-3.14.2-check-to-avoid-crash.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
@ -123,6 +124,7 @@ This package contains the evince web browser plugin.
%prep
%setup -q
%patch0 -p1 -b .render-fail
%patch1 -p1 -b .check-to-avoid-crash
%build
./autogen.sh
@ -256,6 +258,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||:
%{_libdir}/mozilla/plugins/libevbrowserplugin.so
%changelog
* Mon Jun 22 2015 Martin Hatina <mhatina@redhat.com> - 3.14.2-3
- Avoid crash after reloading document
- Resolves: #1203277
* Mon Mar 16 2015 Marek Kasik <mkasik@redhat.com> - 3.14.2-2
- Fix crashes caused by corrupted documents
- Related: #1201996