mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-05 19:15:32 +00:00
Merge branch 'fix-dialing-crash' into 'master'
calls-call: Fix crash with null call state See merge request Librem5/calls!49
This commit is contained in:
commit
dbebc17dbd
1 changed files with 7 additions and 0 deletions
|
@ -38,7 +38,14 @@ calls_call_state_to_string (GString *string,
|
|||
GEnumValue *value;
|
||||
|
||||
klass = g_type_class_ref (CALLS_TYPE_CALL_STATE);
|
||||
|
||||
value = g_enum_get_value (klass, (gint)state);
|
||||
if (!value)
|
||||
{
|
||||
return g_string_printf (string,
|
||||
"Unknown call state (%d)",
|
||||
(gint)state);
|
||||
}
|
||||
|
||||
g_string_assign (string, value->value_nick);
|
||||
string->str[0] = g_ascii_toupper (string->str[0]);
|
||||
|
|
Loading…
Reference in a new issue