mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
Fix module use tracking.
This commit is contained in:
parent
53cea00323
commit
0f73a011ce
@ -247,6 +247,7 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
if (module)
|
||||
{
|
||||
MutterPlugin *p;
|
||||
gboolean use_succeeded;
|
||||
|
||||
/*
|
||||
* This dlopens the module and registers the plugin type with the
|
||||
@ -255,7 +256,7 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
* to guarantee the module will not be unloaded during the plugin
|
||||
* life time. Consequently we can unuse() the module again.
|
||||
*/
|
||||
g_type_module_use (G_TYPE_MODULE (module));
|
||||
use_succeeded = g_type_module_use (G_TYPE_MODULE (module));
|
||||
|
||||
if ((p = mutter_plugin_load (plugin_mgr, module, params)))
|
||||
{
|
||||
@ -266,6 +267,7 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
g_warning ("Plugin load for [%s] failed", path);
|
||||
}
|
||||
|
||||
if (use_succeeded)
|
||||
g_type_module_unuse (G_TYPE_MODULE (module));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user