Skip to content

Commit 5ce04d3

Browse files
fix crash bug in handling of LocationRange in array to json
1 parent 39dfb41 commit 5ce04d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/vm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3270,7 +3270,7 @@ class Interpreter {
32703270
const auto thunk = arr->elements[f.elementId];
32713271
const auto loc = f.location;
32723272
const int indentLevel = (f.indentLevel == 0) ? 0 : f.indentLevel + 1;
3273-
const LocationRange tloc = thunk ? thunk->body->location : loc;
3273+
const LocationRange tloc = thunk->body ? thunk->body->location : loc;
32743274
// Add an explicit call frame for the JSON conversion, used to apply depth limit.
32753275
stack.newCall(tloc, arr, nullptr, 0, BindingFrame{});
32763276
stack.newFrame(FRAME_TO_JSON, tloc);

0 commit comments

Comments
 (0)