Avoid displaying "(null)" if things are really wrong with the registration
This commit is contained in:
parent
09efeba69d
commit
df4c687bc2
@ -740,7 +740,8 @@ static void _phone_set_signal_level(Phone * phone, gdouble level)
|
||||
else
|
||||
{
|
||||
level = 0.0;
|
||||
snprintf(buf, sizeof(buf), "%s", phone->operator);
|
||||
snprintf(buf, sizeof(buf), "%s", (phone->operator != NULL)
|
||||
? phone->operator : "");
|
||||
}
|
||||
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(phone->sy_level), level);
|
||||
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(phone->sy_level), buf);
|
||||
|
Loading…
Reference in New Issue
Block a user