summaryrefslogtreecommitdiff
path: root/src/connection-editor/connection-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection-editor/connection-helpers.c')
-rw-r--r--src/connection-editor/connection-helpers.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 0d29f20a..6ed85577 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -165,9 +165,21 @@ no_description:
NMConnection *
vpn_connection_from_file (const char *filename, GError **error)
{
+ gs_free_error GError *unused_error = NULL;
NMConnection *connection = NULL;
GSList *iter;
+ if (!error) {
+ /* Some VPN plugins crash when passing no error variable ([1]). Work
+ * around that. In the meantime, libnm does the same workaround ([2]).
+ *
+ *
+ * [1] https://gitlab.gnome.org/GNOME/NetworkManager-vpnc/-/blob/c7d197477c94c5bae0396f0ef826db4d835e487d/properties/nm-vpnc-editor-plugin.c#L281
+ * [2] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/3b2eb689f3da1e957216b6106382b9a46bae266f
+ */
+ error = &unused_error;
+ }
+
for (iter = vpn_get_plugin_infos (); !connection && iter; iter = iter->next) {
NMVpnEditorPlugin *plugin;