Do not attempt to load plugin if module is not usable.

This commit is contained in:
Tomas Frydrych 2009-01-06 10:09:16 +00:00
parent e11100e584
commit ec09ac49f6

View File

@ -258,7 +258,8 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
*/
use_succeeded = g_type_module_use (G_TYPE_MODULE (module));
if ((p = mutter_plugin_load (plugin_mgr, module, params)))
if (use_succeeded &&
(p = mutter_plugin_load (plugin_mgr, module, params)))
{
plugin_mgr->plugins = g_list_prepend (plugin_mgr->plugins, p);
}