Commit e6e0d29d authored by Germán Poo-Caamaño's avatar Germán Poo-Caamaño
Browse files

view: Fix end_page reset after reload a page

When a document is reloaded, and the accessible end_page is higher
than the number of pages, it must be re-initialized to the number
of pages minus one because it refers to elements in an array.
parent 7c4721a3
......@@ -395,8 +395,8 @@ initialize_children (EvViewAccessible *self)
* invalid access to self->priv->children
* See https://bugzilla.gnome.org/show_bug.cgi?id=735744
*/
if (self->priv->end_page > n_pages)
self->priv->end_page = n_pages;
if (self->priv->end_page >= n_pages)
self->priv->end_page = n_pages - 1;
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment