iface-modem: ignore warning when trying to disconnect signal handler

The signal handler may have been already removed during dispose of the
modem object, which is run manually through g_object_run_dispose().

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/399
This commit is contained in:
Aleksander Morgado
2021-07-12 21:51:24 +02:00
parent b983deaa40
commit a61422761f
+3 -1
View File
@@ -265,7 +265,9 @@ wait_for_final_state_context_complete (GTask *task,
* 'task' in order to prevent state_changed from being invoked, which
* invokes wait_for_final_state_context_complete again. */
if (ctx->state_changed_id) {
g_signal_handler_disconnect (self, ctx->state_changed_id);
/* may be automatically disconnected during dispose */
if (g_signal_handler_is_connected (self, ctx->state_changed_id))
g_signal_handler_disconnect (self, ctx->state_changed_id);
ctx->state_changed_id = 0;
}