[evince] libview: Add check for pageless documents to ev_view_accessible_focus_changed
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Add check for pageless documents to ev_view_accessible_focus_changed
- Date: Tue, 30 Sep 2014 18:29:59 +0000 (UTC)
commit c0ecc9564fceb12b3580adac3a1257d7feb2b87f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Sep 27 23:40:22 2014 -0400
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
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 ffc617c..7805219 100644
--- a/libview/ev-view-accessible.c
+++ b/libview/ev-view-accessible.c
@@ -450,7 +450,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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]