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 4e5226ca12..b8c732063b 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -385,6 +385,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) {