json: don't assert() if we add a NULL element via json_variant_set_field()

The rest of our JSON code tries hard to magically convert NULL inputs
into "null" JSON objects, let's make sure this also works with
json_variant_set_field().
This commit is contained in:
Lennart Poettering
2021-11-25 14:21:54 +01:00
parent fb0321029c
commit e2c7efd329
2 changed files with 24 additions and 1 deletions
-1
View File
@@ -515,7 +515,6 @@ static void json_variant_set(JsonVariant *a, JsonVariant *b) {
static void json_variant_copy_source(JsonVariant *v, JsonVariant *from) {
assert(v);
assert(from);
if (!json_variant_is_regular(from))
return;