tracker/0001-tracker-extract-Don-t-crash-if-g_file_make_symbolic_.patch
Matthias Clasen d7ba76d58d Fix a crash
2014-12-10 14:33:09 -05:00

34 lines
1.2 KiB
Diff

From ae24f17b6b8251a6359dba9b638847cb0f1f16a1 Mon Sep 17 00:00:00 2001
From: Martyn Russell <martyn@lanedo.com>
Date: Wed, 10 Dec 2014 09:35:34 +0000
Subject: [PATCH] tracker-extract: Don't crash if g_file_make_symbolic_link()
fails with no GError
We assume error is set, but in some cases it is not. Check before using it.
https://bugzilla.gnome.org/show_bug.cgi?id=741141
https://bugzilla.redhat.com/show_bug.cgi?id=1133042
---
src/tracker-extract/tracker-extract-persistence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-persistence.c b/src/tracker-extract/tracker-extract-persistence.c
index 38bdd35..ee9ebf1 100644
--- a/src/tracker-extract/tracker-extract-persistence.c
+++ b/src/tracker-extract/tracker-extract-persistence.c
@@ -144,8 +144,8 @@ persistence_store_file (TrackerExtractPersistence *persistence,
if (!success) {
g_warning ("Could not save '%s' into failsafe persistence store: %s",
- path, error->message);
- g_error_free (error);
+ path, error ? error->message : "no error given");
+ g_clear_error (&error);
}
g_object_unref (link_file);
--
2.1.0