From df4c687bc239fcee52145fb43d10a32c65b2655f Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 28 Apr 2010 21:51:07 +0000 Subject: [PATCH] Avoid displaying "(null)" if things are really wrong with the registration --- src/phone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/phone.c b/src/phone.c index 215cf62..d9619bf 100644 --- a/src/phone.c +++ b/src/phone.c @@ -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);