Commit 5203604b authored by Zeeshan Ali's avatar Zeeshan Ali

wifi: Remove failable checks before clearing state

If my logic is wrong anywhere, the interface proxy might already be NULL
before disconnect_bss_signals() is called so let's not check for that
before clearing the timeout.

This hopefully fixes a crash on wifi scan timeout being called after the
wifi object is destroyed.
parent 1a00809a
......@@ -550,14 +550,18 @@ disconnect_bss_signals (GClueWifi *wifi)
{
GClueWifiPrivate *priv = wifi->priv;
if (priv->bss_added_id == 0 || priv->interface == NULL)
return;
cancel_wifi_scan (wifi);
g_signal_handler_disconnect (priv->interface, priv->bss_added_id);
priv->bss_added_id = 0;
g_signal_handler_disconnect (priv->interface, priv->bss_removed_id);
priv->bss_removed_id = 0;
if (priv->bss_added_id != 0) {
g_signal_handler_disconnect (priv->interface,
priv->bss_added_id);
priv->bss_added_id = 0;
}
if (priv->bss_removed_id != 0) {
g_signal_handler_disconnect (priv->interface,
priv->bss_removed_id);
priv->bss_removed_id = 0;
}
g_hash_table_remove_all (priv->bss_proxies);
g_hash_table_remove_all (priv->ignored_bss_proxies);
......
Markdown is supported
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