[PATCH 4/4] Move g_module_supported() to grl_init()



All requirements should be checked in grl_init().
---
 src/grilo.c               |    5 +++++
 src/grl-plugin-registry.c |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/grilo.c b/src/grilo.c
index 5eb4222..d74ae8b 100644
--- a/src/grilo.c
+++ b/src/grilo.c
@@ -63,6 +63,11 @@ grl_init (gint *argc,
   g_option_context_parse (ctx, argc, argv, NULL);
   g_option_context_free (ctx);
 
+  /* Initialize GModule */
+  if (!g_module_supported ()) {
+    g_error ("GModule not supported in this system");
+  }
+
   /* Register default metadata keys */
   registry = grl_plugin_registry_get_instance ();
   grl_metadata_key_setup_system_keys (registry);
diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c
index 5e91fd8..3f53527 100644
--- a/src/grl-plugin-registry.c
+++ b/src/grl-plugin-registry.c
@@ -76,10 +76,6 @@ G_DEFINE_TYPE (GrlPluginRegistry, grl_plugin_registry, G_TYPE_OBJECT);
 static void
 grl_plugin_registry_class_init (GrlPluginRegistryClass *klass)
 {
-  if (!g_module_supported ()) {
-    g_error ("GModule not supported in this system");
-  }
-
   g_type_class_add_private (klass, sizeof (GrlPluginRegistryPrivate));
 
   /**
-- 
1.7.0.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]