Skip to content

Commit

Permalink
libview: Add check for pageless documents to ev_view_accessible_focus…
Browse files Browse the repository at this point in the history
…_changed

Without this check, Evince will crash when opening a document that, for
whatever reason, has no pages.

https://bugzilla.gnome.org/show_bug.cgi?id=731046

origin commit:
https://git.gnome.org/browse/evince/commit/?id=c0ecc95
  • Loading branch information
joanmarie authored and raveit65 committed Mar 22, 2018
1 parent 9fc7889 commit 8597c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libview/ev-view-accessible.c
Expand Up @@ -448,7 +448,7 @@ ev_view_accessible_focus_changed (GtkWidget *widget,
g_return_val_if_fail (EV_IS_VIEW (widget), FALSE);
g_return_val_if_fail (EV_IS_VIEW_ACCESSIBLE (self), FALSE);

if (self->priv->children == NULL)
if (self->priv->children == NULL || self->priv->children->len == 0)
return FALSE;

page_accessible = g_ptr_array_index (self->priv->children,
Expand Down

0 comments on commit 8597c1d

Please sign in to comment.