[grilo] core: Create table to store optional information
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: Create table to store optional information
- Date: Wed, 13 Apr 2011 18:42:04 +0000 (UTC)
commit a1185da30abec833d6b213e639d24b64f74f490d
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Apr 13 18:41:19 2011 +0000
core: Create table to store optional information
If plugin does not have a valid XML, we need to create anyway this table to
store some information.
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
src/grl-plugin-registry.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c
index dc7dc5f..583523e 100644
--- a/src/grl-plugin-registry.c
+++ b/src/grl-plugin-registry.c
@@ -558,10 +558,14 @@ grl_plugin_registry_load (GrlPluginRegistry *registry,
}
/* Insert module name as part of plugin information */
+ if (!plugin_info->optional_info) {
+ plugin_info->optional_info =
+ g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ }
if (!g_hash_table_lookup (plugin_info->optional_info,
GRL_PLUGIN_INFO_MODULE)) {
g_hash_table_insert (plugin_info->optional_info,
- GRL_PLUGIN_INFO_MODULE,
+ g_strdup (GRL_PLUGIN_INFO_MODULE),
g_path_get_basename (plugin_info->filename));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]