mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-21 18:03:41 +03:00
json: handle NULL explicitly in json_variant_has_type()
This commit is contained in:
parent
6af022fedd
commit
f8c186c9ec
@ -979,6 +979,8 @@ bool json_variant_has_type(JsonVariant *v, JsonVariantType type) {
|
||||
JsonVariantType rt;
|
||||
|
||||
v = json_variant_dereference(v);
|
||||
if (!v)
|
||||
return false;
|
||||
|
||||
rt = json_variant_type(v);
|
||||
if (rt == type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user