[NetworkManager-openvpn] properties: fix assertion setting empty extra-certs filename



commit ceb654bf0e8cee65260fd89f90919bab2994cb9b
Author: Thomas Haller <thaller redhat com>
Date:   Fri Jul 13 09:26:47 2018 +0200

    properties: fix assertion setting empty extra-certs filename
    
    Cannot set the filename to NULL.
    
    Fixes: 3c8d06797dcfdd0111fa228f90741712495180b8

 properties/nm-openvpn-editor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index 1207ef7..2b6aa68 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -1728,7 +1728,8 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 
                widget = GTK_WIDGET (gtk_builder_get_object (builder, "extra_certs_chooser"));
                value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_EXTRA_CERTS);
-               gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), nm_str_not_empty (value));
+               if (value && value[0])
+                       gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), value);
 
                g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (tls_auth_toggled_cb), builder);
                tls_auth_toggled_cb (combo, builder);


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