summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-12-15 10:53:57 +0100
committerJiří Klimeš <jklimes@redhat.com>2015-12-15 11:59:16 +0100
commit0f40ae5157b832622fc3e153bbd587daae1b4a60 (patch)
tree0130912a8a3c5c9d50d8b381792d0fb04408f52e
parent020c7a066c6b0ceb665e6a02d3a90639fbd42513 (diff)
downloadnetwork-manager-applet-0f40ae5157b832622fc3e153bbd587daae1b4a60.tar.gz
editor: do not try to set MAC into the entry if it is NULL
(nm-connection-editor:27026): Gtk-CRITICAL **: gtk_entry_set_text: assertion 'text != NULL' failed
-rw-r--r--src/connection-editor/page-vlan.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 44850222..a9cda2be 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -532,8 +532,11 @@ populate_ui (CEPageVlan *self)
g_signal_connect (priv->id_entry, "value-changed", G_CALLBACK (id_changed), self);
/* Cloned MAC address */
- if (NM_IS_SETTING_WIRED (priv->s_hw))
- gtk_entry_set_text (priv->cloned_mac, nm_setting_wired_get_cloned_mac_address (NM_SETTING_WIRED (priv->s_hw)));
+ if (NM_IS_SETTING_WIRED (priv->s_hw)) {
+ const char *mac = nm_setting_wired_get_cloned_mac_address (NM_SETTING_WIRED (priv->s_hw));
+ if (mac)
+ gtk_entry_set_text (priv->cloned_mac, mac);
+ }
g_signal_connect (priv->cloned_mac, "changed", G_CALLBACK (stuff_changed), self);
/* MTU */