1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 06:39:32 +00:00

best-match: Don't set NULL phone numbers when updating country code

Also related to #255
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-04-12 13:58:11 +02:00
parent a072d8c7e3
commit 21666fc7d4

View file

@ -142,10 +142,13 @@ set_property (GObject *object,
case PROP_COUNTRY_CODE:
country_code = g_value_get_string (value);
if (country_code) {
g_autofree gchar *number = g_strdup (self->phone_number);
g_free (self->country_code);
self->country_code = g_strdup (country_code);
calls_best_match_set_phone_number (self, number);
if (self->phone_number) {
g_autofree gchar *number = g_strdup (self->phone_number);
calls_best_match_set_phone_number (self, number);
}
}
break;