summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 564df18473..5ed9893c80 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -4022,6 +4022,8 @@ stackdepth(struct compiler *c)
b->b_startdepth = INT_MIN;
entryblock = b;
}
+ if (!entryblock)
+ return 0;
return stackdepth_walk(c, entryblock, 0, 0);
}