pidgin/pidgin

41e66d907bc9
Parents 6f490dec468f
Children dadd84e44a30
Fix criticals on disconnect happening after closing Account editor

The connection callback for updating the Account Editor was not disconnected when the dialog was closed, meaning it would cause criticals on disconnect.

Testing Done:
Opened Account editor, closed it, disconnected the account, and saw no criticals from the editor code.

Reviewed at https://reviews.imfreedom.org/r/2001/
--- a/pidgin/pidginaccounteditor.c Sun Oct 30 03:29:33 2022 -0500
+++ b/pidgin/pidginaccounteditor.c Sun Oct 30 03:31:24 2022 -0500
@@ -708,9 +708,9 @@
{
if(g_set_object(&editor->account, account)) {
if(PURPLE_IS_ACCOUNT(account)) {
- g_signal_connect(account, "notify::connection",
- G_CALLBACK(pidgin_account_editor_connection_changed_cb),
- editor);
+ g_signal_connect_object(account, "notify::connection",
+ G_CALLBACK(pidgin_account_editor_connection_changed_cb),
+ editor, 0);
}
g_object_notify_by_pspec(G_OBJECT(editor), properties[PROP_ACCOUNT]);