[gnome-control-center] network: Fix GError being overwritten



commit 6bb77ec1e2503dd681f040e3e26f17bc53c81c5b
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Dec 3 15:22:38 2019 +1300

    network: Fix GError being overwritten

 panels/network/wireless-security/eap-method-tls.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/wireless-security/eap-method-tls.c 
b/panels/network/wireless-security/eap-method-tls.c
index ce7ff13a5..8e3db3307 100644
--- a/panels/network/wireless-security/eap-method-tls.c
+++ b/panels/network/wireless-security/eap-method-tls.c
@@ -107,8 +107,10 @@ validate (EAPMethod *method, GError **error)
                filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (self->ca_cert_button));
                if (filename == NULL) {
                        widget_set_error (GTK_WIDGET (self->ca_cert_button));
-                       g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS CA 
certificate: no certificate specified"));
-                       ret = FALSE;
+                       if (ret) {
+                               g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS 
CA certificate: no certificate specified"));
+                               ret = FALSE;
+                       }
                }
        }
 


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