Commit 921211ea authored by Marek Kašík's avatar Marek Kašík

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
parent 00224d0c
...@@ -366,7 +366,8 @@ document_load_job_completed_callback (EvJobLoad *job_load, ...@@ -366,7 +366,8 @@ document_load_job_completed_callback (EvJobLoad *job_load,
EvRecentViewPrivate *priv = data->ev_recent_view->priv; EvRecentViewPrivate *priv = data->ev_recent_view->priv;
EvDocument *document = EV_JOB (job_load)->document; 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); get_document_info_async_data_free (data);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment