mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 13:08:10 +02: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.
(cherry picked from commit 556b7c3b45)
This commit is contained in:
parent
8a857c4475
commit
a006361fca
1 changed files with 2 additions and 0 deletions
|
|
@ -1202,6 +1202,8 @@ set_property (GObject *object, guint prop_id,
|
||||||
case PROP_DBUS_OBJECT:
|
case PROP_DBUS_OBJECT:
|
||||||
/* Construct only */
|
/* Construct only */
|
||||||
priv->object = g_value_dup_object (value);
|
priv->object = g_value_dup_object (value);
|
||||||
|
if (!priv->object)
|
||||||
|
g_return_if_reached ();
|
||||||
break;
|
break;
|
||||||
case PROP_DBUS_OBJECT_MANAGER:
|
case PROP_DBUS_OBJECT_MANAGER:
|
||||||
/* Construct only */
|
/* Construct only */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue