summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/emitbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index 32e833000..b1b61ba67 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -315,7 +315,7 @@ void mp_emit_bc_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scope) {
emit->last_source_line = 1;
#ifndef NDEBUG
// With debugging enabled labels are checked for unique assignment
- if (pass < MP_PASS_EMIT) {
+ if (pass < MP_PASS_EMIT && emit->label_offsets != NULL) {
memset(emit->label_offsets, -1, emit->max_num_labels * sizeof(mp_uint_t));
}
#endif