diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object_interfaces.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index 9b4155a227..03a95c3276 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -62,6 +62,12 @@ Object *user_creatable_add_type(const char *type, const char *id, assert(qdict); obj = object_new(type); + if (object_property_find(obj, "id", NULL)) { + object_property_set_str(obj, id, "id", &local_err); + if (local_err) { + goto out; + } + } visit_start_struct(v, NULL, NULL, 0, &local_err); if (local_err) { goto out; |