diff options
-rw-r--r-- | headers.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -133,7 +133,9 @@ GC_INNER ptr_t GC_scratch_alloc(size_t bytes) result = (ptr_t)GET_MEM(bytes_to_get); GC_add_to_our_memory(result, bytes_to_get); scratch_free_ptr -= bytes; - GC_scratch_last_end_ptr = result + bytes; + if (result != NULL) { + GC_scratch_last_end_ptr = result + bytes; + } return(result); } |