Skip to content

Commit a136458

Browse files
committed
fix: follow up again
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
1 parent 7632a3c commit a136458

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/pdb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,9 @@ def do_break(self, arg, temporary=False):
14121412
# To be overridden in derived debuggers
14131413
def defaultFile(self):
14141414
"""Produce a reasonable default."""
1415+
if self.curframe is None:
1416+
self.error("No current frame.")
1417+
return None
14151418
filename = self.curframe.f_code.co_filename
14161419
if filename == '<string>' and self.mainpyfile:
14171420
filename = self.mainpyfile

0 commit comments

Comments
 (0)