libnm-glib: warn early if an object is tried to be instantiated without a path

This commit is contained in:
Tomeu Vizoso 2011-08-09 16:31:19 +02:00 committed by Dan Williams
parent 87b88fd38c
commit dd175e3bf7

View file

@ -79,8 +79,6 @@ constructor (GType type,
if (!object)
return NULL;
_nm_object_cache_add (NM_OBJECT (object));
priv = NM_OBJECT_GET_PRIVATE (object);
if (priv->connection == NULL || priv->path == NULL) {
@ -94,6 +92,8 @@ constructor (GType type,
priv->path,
"org.freedesktop.DBus.Properties");
_nm_object_cache_add (NM_OBJECT (object));
return object;
}