[tracker] libtracker-miner: Decorator causes crash on _update_array_finish() failures.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Decorator causes crash on _update_array_finish() failures.
- Date: Tue, 22 Apr 2014 10:18:06 +0000 (UTC)
commit a1efdb7691542c4a871b3bd4d0aefe6aa34012f8
Author: Martyn Russell <martyn lanedo com>
Date: Tue Apr 22 11:12:52 2014 +0100
libtracker-miner: Decorator causes crash on _update_array_finish() failures.
https://bugzilla.gnome.org/show_bug.cgi?id=728546
src/libtracker-miner/tracker-decorator.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 760eb97..e9c38c5 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -328,19 +328,22 @@ decorator_commit_cb (GObject *object,
g_warning ("There was an error pushing metadata: %s\n", error->message);
}
- for (i = 0; i < errors->len; i++) {
- GError *child_error;
+ if (errors) {
+ for (i = 0; i < errors->len; i++) {
+ GError *child_error;
- child_error = g_ptr_array_index (errors, i);
+ child_error = g_ptr_array_index (errors, i);
- if (child_error) {
- g_warning ("Task %d, error: %s", i, child_error->message);
- g_warning ("Sparql update was:\n%s\n",
- (gchar *) g_ptr_array_index (sparql, i));
+ if (child_error) {
+ g_warning ("Task %d, error: %s", i, child_error->message);
+ g_warning ("Sparql update was:\n%s\n",
+ (gchar *) g_ptr_array_index (sparql, i));
+ }
}
+
+ g_ptr_array_unref (errors);
}
- g_ptr_array_unref (errors);
g_ptr_array_unref (sparql);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]