Skip to content
Browse files

libview: Add check for pageless documents to ev_view_accessible_focus…


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

origin commit:
  • Loading branch information...
joanmarie authored and raveit65 committed Sep 28, 2014
1 parent aa3bcfa commit 10d764dae5d02a3c29973ef0aadaa9fdcdd297bd
Showing with 1 addition and 1 deletion.
  1. +1 −1 libview/ev-view-accessible.c
@@ -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,

0 comments on commit 10d764d

Please sign in to comment.
You can’t perform that action at this time.