Commit b4f6cad6 authored by Richard Hughes's avatar Richard Hughes
Browse files

Fix a crash when using fu_plugin_device_add_delay()

By removing the device from the hash table before we add it to the devices
array we could inadvertently drop the last object reference if the plugin is
not using the (optional) cache.

Just re-arrange things to fix
parent fc2a17b9
......@@ -370,8 +370,8 @@ static gboolean
fu_plugin_device_add_delay_cb (gpointer user_data)
FuPluginHelper *helper = (FuPluginHelper *) user_data;
g_hash_table_remove (helper->devices, helper->device);
fu_plugin_device_add (helper->plugin, helper->device);
g_hash_table_remove (helper->devices, helper->device);
fu_plugin_helper_free (helper);
return FALSE;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment