From 0f40ae5157b832622fc3e153bbd587daae1b4a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 15 Dec 2015 10:53:57 +0100 Subject: 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 --- src/connection-editor/page-vlan.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/connection-editor') 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 */ -- cgit v1.2.1