We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 101f734 commit 09d4d88Copy full SHA for 09d4d88
1 file changed
ext/json/ext/parser/parser.c
@@ -241,8 +241,10 @@ static void rvalue_stack_mark(void *ptr)
241
{
242
rvalue_stack *stack = (rvalue_stack *)ptr;
243
long index;
244
- for (index = 0; index < stack->head; index++) {
245
- rb_gc_mark(stack->ptr[index]);
+ if (stack && stack->ptr) {
+ for (index = 0; index < stack->head; index++) {
246
+ rb_gc_mark(stack->ptr[index]);
247
+ }
248
}
249
250
0 commit comments