[evince] recent-view: Check whether load job succeeded
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] recent-view: Check whether load job succeeded
- Date: Wed, 11 Feb 2015 10:58:30 +0000 (UTC)
commit afc1a86c2d706ae2ea4866581ba2522288a4437f
Author: Marek Kasik <mkasik redhat com>
Date: Wed Feb 11 11:52:09 2015 +0100
recent-view: Check whether load job succeeded
Check whether document load job succeeded before proceeding its metadata.
This fixes crash when there are no recent files and you are trying to open
password protected PDF file
(see https://bugzilla.redhat.com/show_bug.cgi?id=1189222).
https://bugzilla.gnome.org/show_bug.cgi?id=744049
shell/ev-recent-view.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-recent-view.c b/shell/ev-recent-view.c
index fb0004c..facea47 100644
--- a/shell/ev-recent-view.c
+++ b/shell/ev-recent-view.c
@@ -366,7 +366,8 @@ document_load_job_completed_callback (EvJobLoad *job_load,
EvRecentViewPrivate *priv = data->ev_recent_view->priv;
EvDocument *document = EV_JOB (job_load)->document;
- if (g_cancellable_is_cancelled (data->cancellable) || !document) {
+ if (g_cancellable_is_cancelled (data->cancellable) ||
+ ev_job_is_failed (EV_JOB (job_load))) {
get_document_info_async_data_free (data);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]