diff options
Diffstat (limited to 'e-util/e-plugin.c')
-rw-r--r-- | e-util/e-plugin.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index d163a8a5ec..6167b1238f 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -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); } } |