[tracker/tracker-1.0] 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/tracker-1.0] libtracker-miner: Decorator causes crash on _update_array_finish() failures.
- Date: Tue, 29 Apr 2014 18:55:33 +0000 (UTC)
commit ad3206046648800d7f9ca7478b9be3f7fae1e87c
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]