[totem] Ensure totem_plugins_engine_get_default() always returns a new reference
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Ensure totem_plugins_engine_get_default() always returns a new reference
- Date: Mon, 20 Dec 2010 01:03:38 +0000 (UTC)
commit 53c3fc7b54e7cfca147329480c776479c8941aec
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Dec 20 00:58:55 2010 +0000
Ensure totem_plugins_engine_get_default() always returns a new reference
src/plugins/totem-dirs.c | 2 ++
src/plugins/totem-plugins-engine.c | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/totem-dirs.c b/src/plugins/totem-dirs.c
index a87208b..d166b33 100644
--- a/src/plugins/totem-dirs.c
+++ b/src/plugins/totem-dirs.c
@@ -142,6 +142,8 @@ totem_plugin_find_file (const char *plugin_name,
if (ret == NULL)
ret = totem_interface_get_full_path (file);
+ g_object_unref (engine);
+
//FIXME
#if 0
/* ensure it's an absolute path, so doesn't confuse rb_glade_new et al */
diff --git a/src/plugins/totem-plugins-engine.c b/src/plugins/totem-plugins-engine.c
index 160714b..77ba1a3 100644
--- a/src/plugins/totem-plugins-engine.c
+++ b/src/plugins/totem-plugins-engine.c
@@ -101,7 +101,7 @@ totem_plugins_engine_get_default (TotemObject *totem)
guint i;
if (G_LIKELY (engine != NULL))
- return engine;
+ return g_object_ref (engine);
g_return_val_if_fail (totem != NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]