summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 564df18..5ed9893 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);
}