[gnome-control-center] network: Don't try to show a wizard that failed to setup
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Don't try to show a wizard that failed to setup
- Date: Thu, 28 Jun 2012 12:46:03 +0000 (UTC)
commit 59b7500fb64e907fef101ef5607d721e04b0ebe2
Author: Richard Hughes <richard hughsie com>
Date: Thu Jun 28 13:41:29 2012 +0100
network: Don't try to show a wizard that failed to setup
This fixes a critical warning when mobile-broadband-provider-info isn't
installed into the correct prefix.
panels/network/network-dialogs.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/network-dialogs.c b/panels/network/network-dialogs.c
index 9721e61..bdbd0f0 100644
--- a/panels/network/network-dialogs.c
+++ b/panels/network/network-dialogs.c
@@ -485,9 +485,17 @@ cc_network_panel_connect_to_3g_network (CcNetworkPanel *panel,
if (caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) {
wizard = nma_mobile_wizard_new (GTK_WINDOW (toplevel), NULL, NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS, FALSE,
gsm_mobile_wizard_done, closure);
+ if (wizard == NULL) {
+ g_warning ("failed to construct GSM wizard");
+ return;
+ }
} else if (caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) {
wizard = nma_mobile_wizard_new (GTK_WINDOW (toplevel), NULL, NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO, FALSE,
cdma_mobile_wizard_done, closure);
+ if (wizard == NULL) {
+ g_warning ("failed to construct CDMA wizard");
+ return;
+ }
} else {
g_warning ("Network panel loaded with connect-3g but the selected device"
" does not support GSM or CDMA");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]