network: Fix VPN UI not showing up

The VPN editor API changed as well.

https://bugzilla.gnome.org/show_bug.cgi?id=767614
This commit is contained in:
Bastien Nocera 2016-06-13 18:36:41 +02:00
parent 2a7b19202b
commit 7adfaf1ed9

View file

@ -94,7 +94,13 @@ load_vpn_plugin (CEPageVpn *page, NMConnection *connection)
CEPage *parent = CE_PAGE (page);
GtkWidget *ui_widget, *failure;
ui_widget = GTK_WIDGET (nm_vpn_editor_get_widget (page->editor));
page->editor = nm_vpn_editor_plugin_get_editor (page->plugin,
connection,
NULL);
ui_widget = NULL;
if (page->editor)
ui_widget = GTK_WIDGET (nm_vpn_editor_get_widget (page->editor));
if (!ui_widget) {
g_clear_object (&page->editor);
page->plugin = NULL;