bearer-qmi: signal id may be 0 even if enable == FALSE

E.g. if the connection attempt fails, connect_context_complete_and_free() may
be called before the signals are connected to the QmiClients.

https://bugs.freedesktop.org/show_bug.cgi?id=99047
This commit is contained in:
Aleksander Morgado
2016-12-11 12:43:51 +01:00
parent 905c8a48e9
commit 4197dd2e70

View File

@@ -821,8 +821,7 @@ common_setup_cleanup_unsolicited_events (MMBearerQmi *self,
"packet-service-status",
G_CALLBACK (packet_service_status_indication_cb),
self);
} else {
g_assert (*indication_id != 0);
} else if (*indication_id != 0) {
g_signal_handler_disconnect (client, *indication_id);
*indication_id = 0;
}