mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-17 07:46:03 +00:00
record-row: Avoid raising critical
When the record has a NULL id there won't be a CallsBestMatch we can use to bind properties.
This commit is contained in:
parent
1593625373
commit
134c4af9c7
1 changed files with 6 additions and 1 deletions
|
@ -294,11 +294,16 @@ on_notify_can_add_contacts (CallsCallRecordRow *self)
|
||||||
if (!calls_contacts_provider_get_can_add_contacts (contacts_provider))
|
if (!calls_contacts_provider_get_can_add_contacts (contacts_provider))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_data(contacts_provider, self);
|
||||||
|
|
||||||
|
/* The record has a NULL id */
|
||||||
|
if (!self->contact)
|
||||||
|
return;
|
||||||
|
|
||||||
g_object_bind_property (self->contact, "has-individual",
|
g_object_bind_property (self->contact, "has-individual",
|
||||||
action_new_contact, "enabled",
|
action_new_contact, "enabled",
|
||||||
G_BINDING_SYNC_CREATE |
|
G_BINDING_SYNC_CREATE |
|
||||||
G_BINDING_INVERT_BOOLEAN);
|
G_BINDING_INVERT_BOOLEAN);
|
||||||
g_signal_handlers_disconnect_by_data(contacts_provider, self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue