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
parent 00224d0c
......@@ -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);
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