diff --git a/Lib/turtle.py b/Lib/turtle.py index 465d6e065d1..c9e88d9dd12 100644 --- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -2594,7 +2594,7 @@ class RawTurtle(TPen, TNavigator): Example (for a Turtle instance named turtle): >>> turtle.setundobuffer(42) """ - if size is None: + if size is None or size <= 0: self.undobuffer = None else: self.undobuffer = Tbuffer(size)