supplicant: don't try to give dbus-glib a NULL path on interface removal

This commit is contained in:
Dan Williams
2009-06-12 10:31:16 -04:00
parent 48e7a9eb47
commit daa8d8c9ca

View File

@@ -287,6 +287,9 @@ try_remove_iface (DBusGConnection * g_connection,
{ {
DBusGProxy *proxy; DBusGProxy *proxy;
g_return_if_fail (g_connection != NULL);
g_return_if_fail (path != NULL);
proxy = dbus_g_proxy_new_for_name (g_connection, proxy = dbus_g_proxy_new_for_name (g_connection,
WPAS_DBUS_SERVICE, WPAS_DBUS_SERVICE,
WPAS_DBUS_PATH, WPAS_DBUS_PATH,
@@ -316,9 +319,11 @@ nm_supplicant_interface_dispose (GObject *object)
/* Ask wpa_supplicant to remove this interface */ /* Ask wpa_supplicant to remove this interface */
sm_state = nm_supplicant_manager_get_state (priv->smgr); sm_state = nm_supplicant_manager_get_state (priv->smgr);
if (sm_state == NM_SUPPLICANT_MANAGER_STATE_IDLE) { if (sm_state == NM_SUPPLICANT_MANAGER_STATE_IDLE) {
if (priv->object_path) {
try_remove_iface (nm_dbus_manager_get_connection (priv->dbus_mgr), try_remove_iface (nm_dbus_manager_get_connection (priv->dbus_mgr),
priv->object_path); priv->object_path);
} }
}
if (priv->iface_proxy) if (priv->iface_proxy)
g_object_unref (priv->iface_proxy); g_object_unref (priv->iface_proxy);