mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 11:35:32 +00:00
sip: provider: Keep provider alive while there are still origins
CallsSipOrigin accesses the CallsSipContext (owned by the provider) in its dispose() which will be invalid once CallsSipProvider gets freed. This commit will make certain that the provider stays alive for the lifetime of it's origins.
This commit is contained in:
parent
cfd3c2a7fe
commit
f930874d00
1 changed files with 4 additions and 0 deletions
|
@ -363,6 +363,8 @@ add_account (CallsAccountProvider *acc_provider,
|
|||
|
||||
self = CALLS_SIP_PROVIDER (acc_provider);
|
||||
|
||||
g_object_ref (acc_provider);
|
||||
|
||||
return !!calls_sip_provider_add_origin (self, credentials, 0, FALSE);
|
||||
}
|
||||
|
||||
|
@ -391,6 +393,8 @@ remove_account (CallsAccountProvider *acc_provider,
|
|||
g_hash_table_remove (self->credentials, credentials);
|
||||
g_list_store_remove (self->origins, position);
|
||||
|
||||
g_object_unref (acc_provider);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue