[gnome-documents] pdf-loader: Fix CRITICALs when loading from Google or SkyDrive
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] pdf-loader: Fix CRITICALs when loading from Google or SkyDrive
- Date: Mon, 25 Nov 2013 12:43:59 +0000 (UTC)
commit 6a7a124dc68ac18534156b7369b8172881dbded7
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Nov 22 19:35:53 2013 +0100
pdf-loader: Fix CRITICALs when loading from Google or SkyDrive
Fallout from 53a17bdb40d5f82f8ac8f655afc657bcf835da22
https://bugzilla.gnome.org/show_bug.cgi?id=715032
src/lib/gd-pdf-loader.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/lib/gd-pdf-loader.c b/src/lib/gd-pdf-loader.c
index 2e5d732..1827259 100644
--- a/src/lib/gd-pdf-loader.c
+++ b/src/lib/gd-pdf-loader.c
@@ -1175,20 +1175,21 @@ pdf_load_job_from_remote_file (PdfLoadJob *job)
static void
pdf_load_job_start (PdfLoadJob *job)
{
- GFile *file;
+ GFile *file = NULL;
- file = g_file_new_for_uri (job->uri);
+ if (job->uri != NULL)
+ file = g_file_new_for_uri (job->uri);
if (job->gdata_entry != NULL)
pdf_load_job_from_google_documents (job);
else if (job->zpj_entry != NULL)
pdf_load_job_from_skydrive (job);
- else if (!g_file_is_native (file))
+ else if (file != NULL && !g_file_is_native (file))
pdf_load_job_from_remote_file (job);
else
pdf_load_job_from_regular_file (job);
- g_object_unref (file);
+ g_clear_object (&file);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]