[network-manager-applet/jk/editor-vlan: 3/3] editor: do not try to set MAC into the entry if it is NULL



commit 0f40ae5157b832622fc3e153bbd587daae1b4a60
Author: Jiří Klimeš <jklimes redhat com>
Date:   Tue Dec 15 10:53:57 2015 +0100

    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 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 4485022..a9cda2b 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]