mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 18:30:32 +01:00
libnm: add assertion to NMObject that a dbus-object is set
The libnm cache types don't have public _new() functions. However, such types can be easily created using g_object_new() directly from user code. Such a usage is not supported. Add an assertion that a valid dbus-object is present.
This commit is contained in:
parent
9ed0e3705e
commit
556b7c3b45
1 changed files with 2 additions and 0 deletions
|
|
@ -1202,6 +1202,8 @@ set_property (GObject *object, guint prop_id,
|
|||
case PROP_DBUS_OBJECT:
|
||||
/* Construct only */
|
||||
priv->object = g_value_dup_object (value);
|
||||
if (!priv->object)
|
||||
g_return_if_reached ();
|
||||
break;
|
||||
case PROP_DBUS_OBJECT_MANAGER:
|
||||
/* Construct only */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue