--- a/gplugin/gplugin-manager.c Thu Jan 31 22:06:35 2019 -0500
+++ b/gplugin/gplugin-manager.c Thu Jan 31 22:12:25 2019 -0500
@@ -477,9 +477,9 @@
/* now insert into our view */
- g_hash_table_insert(manager->plugins_filename_view,
- g_object_ref(G_OBJECT(plugin)));
+ g_hash_table_replace(manager->plugins_filename_view, + g_object_ref(G_OBJECT(plugin))); /* Grab the list of plugins with our id and prepend the new
* plugin to it before updating it.
@@ -487,10 +487,12 @@
l = g_hash_table_lookup(manager->plugins, id);
for(ll = l; ll; ll = ll->next) {
GPluginPlugin *splugin = GPLUGIN_PLUGIN(ll->data);
- const gchar *sfilename = gplugin_plugin_get_filename(splugin);
+ gchar *sfilename = gplugin_plugin_get_filename(splugin); if(!g_strcmp0(real_filename, sfilename))
l = g_slist_prepend(l, g_object_ref(plugin));
@@ -1064,7 +1066,7 @@
* a value of the plugin itself.
manager->plugins_filename_view =
- g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
+ g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); /* The loaders hash table is keyed on the supported extensions of the
* loader. Which means that a loader that supports multiple extensions