[calls] ui-call-data: Handle anonymous callers gracefully
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] ui-call-data: Handle anonymous callers gracefully
- Date: Tue, 22 Feb 2022 09:30:39 +0000 (UTC)
commit 79875cb64efde3ff0fbb7137c244a217adc7d76c
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Thu Feb 17 11:51:37 2022 +0100
ui-call-data: Handle anonymous callers gracefully
src/calls-ui-call-data.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/calls-ui-call-data.c b/src/calls-ui-call-data.c
index 70f39b9c..cc6a2a4d 100644
--- a/src/calls-ui-call-data.c
+++ b/src/calls-ui-call-data.c
@@ -144,7 +144,10 @@ calls_ui_call_data_get_avatar_icon (CuiCall *call_data)
g_return_val_if_fail (CALLS_UI_CALL_DATA (self), NULL);
- return calls_best_match_get_avatar (self->best_match);
+ if (self->best_match)
+ return calls_best_match_get_avatar (self->best_match);
+ else
+ return NULL;
}
@@ -332,6 +335,9 @@ set_call_data (CallsUiCallData *self,
calls_contacts_provider_lookup_id (contacts_provider,
calls_call_get_id (call));
+ if (!self->best_match)
+ return;
+
g_signal_connect_object (self->best_match,
"notify::name",
G_CALLBACK (on_notify_name),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]