[grilo] core: Increase reference in list content, not list node
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: Increase reference in list content, not list node
- Date: Fri, 14 Sep 2012 13:17:51 +0000 (UTC)
commit e0172c8cba65663cd8a06c10fd10757080362172
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Fri Sep 14 15:15:37 2012 +0200
core: Increase reference in list content, not list node
Fixes a crash when doing g_object_ref (node) instead of g_object_ref
(node->data).
Node is a GList node containing a gobject.
src/grl-source.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-source.c b/src/grl-source.c
index 7149000..3810158 100644
--- a/src/grl-source.c
+++ b/src/grl-source.c
@@ -2635,7 +2635,7 @@ store_metadata_idle (gpointer user_data)
sms = g_new (GrlSourceStoreMetadataSpec, 1);
- sms->source = g_object_ref (g_list_first (smrc->use_sources));
+ sms->source = g_object_ref (g_list_first (smrc->use_sources)->data);
sms->keys = g_hash_table_lookup (smrc->map, sms->source);
sms->media = g_object_ref (smrc->media);
sms->callback = store_metadata_ctl_cb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]