[gnome-control-center] network: do not assert if a widget is missing, instead print a critical warning with the widget name
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: do not assert if a widget is missing, instead print a critical warning with the widget name
- Date: Wed, 6 Apr 2011 09:08:57 +0000 (UTC)
commit 81799838a3557c82bd69db5f93d35df7ff5f4992
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 6 10:05:44 2011 +0100
network: do not assert if a widget is missing, instead print a critical warning with the widget name
This helps us debug bugs like #646837
I've also asked the designers to clarify what entries we should show on the mobile broadband page too.
panels/network/cc-network-panel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index cb3c19f..73efab7 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -688,7 +688,10 @@ panel_set_widget_data (CcNetworkPanel *panel,
label_id = g_strdup_printf ("label_%s_%s", sub_pane, widget_suffix);
heading = GTK_WIDGET (gtk_builder_get_object (priv->builder, heading_id));
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, label_id));
- g_assert (heading != NULL);
+ if (heading == NULL || widget == NULL) {
+ g_critical ("no widgets %s, %s found", heading_id, label_id);
+ return;
+ }
g_free (heading_id);
g_free (label_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]