diff options
Diffstat (limited to 'src/nmtui/nmt-page-bridge.c')
-rw-r--r-- | src/nmtui/nmt-page-bridge.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nmtui/nmt-page-bridge.c b/src/nmtui/nmt-page-bridge.c index 52af8db127..78c1b7c1e1 100644 --- a/src/nmtui/nmt-page-bridge.c +++ b/src/nmtui/nmt-page-bridge.c @@ -9,6 +9,7 @@ */ #include "libnm-client-aux-extern/nm-default-client.h" +#include "libnm-core-aux-intern/nm-libnm-core-utils.h" #include "nmt-page-bridge.h" @@ -53,11 +54,7 @@ nmt_page_bridge_constructed(GObject *object) NMConnection * conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(bridge)); - s_bridge = nm_connection_get_setting_bridge(conn); - if (!s_bridge) { - nm_connection_add_setting(conn, nm_setting_bridge_new()); - s_bridge = nm_connection_get_setting_bridge(conn); - } + s_bridge = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_BRIDGE); section = nmt_editor_section_new(_("BRIDGE"), NULL, TRUE); grid = nmt_editor_section_get_body(section); |