diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-12-15 10:53:57 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-12-15 11:59:16 +0100 |
commit | 0f40ae5157b832622fc3e153bbd587daae1b4a60 (patch) | |
tree | 0130912a8a3c5c9d50d8b381792d0fb04408f52e /src/connection-editor | |
parent | 020c7a066c6b0ceb665e6a02d3a90639fbd42513 (diff) | |
download | network-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
Diffstat (limited to 'src/connection-editor')
-rw-r--r-- | src/connection-editor/page-vlan.c | 7 |
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 */ |