diff options
author | Joanmarie Diggs <[email protected]> | 2014-09-27 23:40:22 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-03-22 08:45:14 +0100 |
commit | 10d764dae5d02a3c29973ef0aadaa9fdcdd297bd (patch) | |
tree | b20474ad2e94ded0233d971cc7dfac077102b556 | |
parent | aa3bcfa7315593044de3a0462eabd1bf1d23df4b (diff) | |
download | atril-10d764dae5d02a3c29973ef0aadaa9fdcdd297bd.tar.bz2 atril-10d764dae5d02a3c29973ef0aadaa9fdcdd297bd.tar.xz |
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
-rw-r--r-- | libview/ev-view-accessible.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c index 8274aced..b19e5120 100644 --- a/libview/ev-view-accessible.c +++ b/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, |