[network-manager-applet/polkit1: 1/2] mobile-wizard: fix Unlisted plan entry segfault
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Subject: [network-manager-applet/polkit1: 1/2] mobile-wizard: fix Unlisted plan entry segfault
- Date: Thu, 23 Jul 2009 13:42:25 +0000 (UTC)
commit 9b84d7b216a14a59c8f9f14cdc933513e8122842
Author: Mikhail Efremov <mikhefr gmail com>
Date: Thu Jul 16 09:55:51 2009 -0400
mobile-wizard: fix Unlisted plan entry segfault
src/utils/mobile-wizard.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/utils/mobile-wizard.c b/src/utils/mobile-wizard.c
index 0045283..91cd800 100644
--- a/src/utils/mobile-wizard.c
+++ b/src/utils/mobile-wizard.c
@@ -305,18 +305,23 @@ confirm_prepare (MobileWizard *self)
gtk_widget_hide (self->confirm_plan);
gtk_widget_hide (self->confirm_apn);
} else {
+ const char *apn = NULL;
+
/* Plan */
gtk_widget_show (self->confirm_plan_label);
gtk_widget_show (self->confirm_plan);
gtk_widget_show (self->confirm_apn);
- if (method)
+ if (method) {
gtk_label_set_text (GTK_LABEL (self->confirm_plan), method->name);
- else
+ apn = method->gsm_apn;
+ } else {
gtk_label_set_text (GTK_LABEL (self->confirm_plan), _("Unlisted"));
+ apn = gtk_entry_get_text (GTK_ENTRY (self->plan_unlisted_entry));
+ }
str = g_string_new (NULL);
- g_string_append_printf (str, "<span color=\"#999999\">APN: %s</span>", method->gsm_apn);
+ g_string_append_printf (str, "<span color=\"#999999\">APN: %s</span>", apn);
gtk_label_set_markup (GTK_LABEL (self->confirm_apn), str->str);
g_string_free (str, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]