Commit c3255ed7 authored by Thomas Haller's avatar Thomas Haller

applet: remove assert(s_con) from applet_get_active_vpn_connection()

This assertion is just to strict. On client side, we cannot expect that
all connections that NetworkManager exposes are valid.

In libnm/libnm-glib there was an old bug, that connections which don't verify
could be completely bogus and thus hit this assertion. This got fixed by
https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=23136ecf89f279479337ead355b7ff5e80465a0b
and with a fixed libnm/libnm-glib, we would always expect that a
connection has at least a NMSettingConnection instance.

Nonetheless, there is no reason to enforce that with an assert.

This was already fixed before by 22468c05
and reverted again by c86d6663.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815668
https://bugzilla.redhat.com/show_bug.cgi?id=1313866
https://bugzilla.redhat.com/show_bug.cgi?id=1314650
https://bugzilla.gnome.org/show_bug.cgi?id=765830
parent 2af8361c
......@@ -1112,7 +1112,8 @@ applet_get_active_vpn_connection (NMApplet *applet,
continue;
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (!s_con)
continue;
if (!strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_VPN_SETTING_NAME)) {
ret = candidate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment