core: ensure active connection has a device before exporting it

This commit is contained in:
Dan Williams 2013-04-26 11:06:58 -05:00
parent 428ebf42b0
commit f6f626de34

View file

@ -210,6 +210,8 @@ nm_active_connection_export (NMActiveConnection *self)
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
static guint32 counter = 0;
g_assert (priv->device || priv->vpn);
priv->path = g_strdup_printf (NM_DBUS_PATH "/ActiveConnection/%d", counter++);
nm_dbus_manager_register_object (nm_dbus_manager_get (), priv->path, self);
}