aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qom/object.c b/qom/object.c
index 3966a3d461..1555547727 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -386,6 +386,9 @@ void object_apply_global_props(Object *obj, const GPtrArray *props, Error **errp
if (object_dynamic_cast(obj, p->driver) == NULL) {
continue;
}
+ if (p->optional && !object_property_find(obj, p->property, NULL)) {
+ continue;
+ }
p->used = true;
object_property_parse(obj, p->value, p->property, &err);
if (err != NULL) {