if the plugin fails to load just disable it, don't unref it (it may be

2004-11-19  Not Zed  <NotZed@Ximian.com>

        * e-plugin.c (ep_load): if the plugin fails to load just disable
        it, don't unref it (it may be referenced elsewhere).

svn path=/trunk/; revision=27944
This commit is contained in:
Not Zed
2004-11-19 01:34:21 +00:00
committed by Michael Zucci
parent 1faa77c293
commit eccb379e0c
2 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2004-11-19 Not Zed <NotZed@Ximian.com>
* e-plugin.c (ep_load): if the plugin fails to load just disable
it, don't unref it (it may be referenced elsewhere).
2004-11-18 Not Zed <NotZed@Ximian.com>
* e-plugin.c (epl_loadmodule): split out module loadng code.

View File

@ -333,13 +333,11 @@ ep_load(const char *filename)
ep->id = id;
ep->path = g_strdup(filename);
ep->enabled = ep_check_enabled(id);
if (e_plugin_construct(ep, root) == -1) {
g_object_unref(ep);
} else {
g_hash_table_insert(ep_plugins, ep->id, ep);
pdoc->plugins = g_slist_prepend(pdoc->plugins, ep);
cache |= (ep->hooks_pending != NULL);
}
if (e_plugin_construct(ep, root) == -1)
e_plugin_enable(ep, FALSE);
g_hash_table_insert(ep_plugins, ep->id, ep);
pdoc->plugins = g_slist_prepend(pdoc->plugins, ep);
cache |= (ep->hooks_pending != NULL);
}
}