diff --git a/include/valijson/schema_parser.hpp b/include/valijson/schema_parser.hpp index bd86226..94da04d 100644 --- a/include/valijson/schema_parser.hpp +++ b/include/valijson/schema_parser.hpp @@ -88,8 +88,10 @@ public: } if ((itr = object.find("allOf")) != object.end()) { - const AdapterType &childNode = resolveReference(deref, schema, itr->second); - schema.addConstraint(makeAllOfConstraint(childNode, deref)); + const AdapterType originalChildNode = itr->second; + const AdapterType &actualChildNode = resolveReference(deref, schema, + originalChildNode); + schema.addConstraint(makeAllOfConstraint(actualChildNode, deref)); } if ((itr = object.find("anyOf")) != object.end()) {