Skip to content

Commit 8597c1d

Browse files
joanmarieraveit65
authored andcommitted
libview: Add check for pageless documents to ev_view_accessible_focus_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
1 parent 9fc7889 commit 8597c1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libview/ev-view-accessible.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ ev_view_accessible_focus_changed (GtkWidget *widget,
448448
g_return_val_if_fail (EV_IS_VIEW (widget), FALSE);
449449
g_return_val_if_fail (EV_IS_VIEW_ACCESSIBLE (self), FALSE);
450450

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

454454
page_accessible = g_ptr_array_index (self->priv->children,

0 commit comments

Comments
 (0)