Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 3de3671f6e86d56d2180f3b9c3f2a56d6193d664..dc5bbbe689c02fdbb5d9b4cc52c066445500a1f5 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -13031,7 +13031,9 @@ void Context::PrintJSONImpl(JSONStream* stream, bool ref) const { |
} |
const Context& parent_context = Context::Handle(parent()); |
- jsobj.AddProperty("parent", parent_context); |
+ if (!parent_context.IsNull()) { |
+ jsobj.AddProperty("parent", parent_context); |
+ } |
JSONArray jsarr(&jsobj, "variables"); |
Object& var = Object::Handle(); |