aboutsummaryrefslogtreecommitdiff
path: root/qom/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/object.c')
-rw-r--r--qom/object.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index dbdab0a..aa6f3a2 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -390,7 +390,17 @@ void object_apply_global_props(Object *obj, const GPtrArray *props, Error **errp
if (err != NULL) {
error_prepend(&err, "can't apply global %s.%s=%s: ",
p->driver, p->property, p->value);
- error_propagate(errp, err);
+ /*
+ * If errp != NULL, propagate error and return.
+ * If errp == NULL, report a warning, but keep going
+ * with the remaining globals.
+ */
+ if (errp) {
+ error_propagate(errp, err);
+ return;
+ } else {
+ warn_report_err(err);
+ }
}
}
}