mm-base-manager: remove element from hastable by key, not value
The hashtable is keyed on the UID of the MMDevice, and its hash function is g_str_hash. We shouldn't be passing a GObject into g_hash_table_remove because calling g_str_hash on an MMDevice is wrong.
This commit is contained in:

committed by
Aleksander Morgado

parent
10cb61f399
commit
d416ea491d
@@ -628,7 +628,7 @@ remove_disable_ready (MMBaseModem *modem,
|
||||
if (device) {
|
||||
g_cancellable_cancel (mm_base_modem_peek_cancellable (modem));
|
||||
mm_device_remove_modem (device);
|
||||
g_hash_table_remove (self->priv->devices, device);
|
||||
g_hash_table_remove (self->priv->devices, mm_device_get_uid (device));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user