mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 12:25:31 +00:00
ofono: call: ensure signals get disconnected on voice_call object destruction
The 'property-changed' and 'disconnect-reason' signals weren't disconnected on the voice_call object cleanup, and callbacks would thus still be fired once a second call happens, resulting in a crash. Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
This commit is contained in:
parent
1705b75c3e
commit
ddab47d288
1 changed files with 6 additions and 4 deletions
|
@ -310,10 +310,12 @@ constructed (GObject *object)
|
||||||
|
|
||||||
g_return_if_fail (self->voice_call != NULL);
|
g_return_if_fail (self->voice_call != NULL);
|
||||||
|
|
||||||
g_signal_connect_swapped (self->voice_call, "property-changed",
|
g_signal_connect_object (self->voice_call, "property-changed",
|
||||||
G_CALLBACK (property_changed_cb), self);
|
G_CALLBACK (property_changed_cb),
|
||||||
g_signal_connect_swapped (self->voice_call, "disconnect-reason",
|
self, G_CONNECT_SWAPPED);
|
||||||
G_CALLBACK (disconnect_reason_cb), self);
|
g_signal_connect_object (self->voice_call, "disconnect-reason",
|
||||||
|
G_CALLBACK (disconnect_reason_cb),
|
||||||
|
self, G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
G_OBJECT_CLASS (calls_ofono_call_parent_class)->constructed (object);
|
G_OBJECT_CLASS (calls_ofono_call_parent_class)->constructed (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue