diff options
author | Raymond Hettinger <python@rcn.com> | 2014-07-21 04:26:04 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2014-07-21 04:26:04 (GMT) |
commit | b606d45fb26d38ba00b06a4349fd05172ba9e12c (patch) | |
tree | 14a4b625b8f5f4b7830260a620bf869f6e5c8256 /Lib/lib-tk/turtle.py | |
parent | e2d1e64a1ffd04a274e911c53fd9ee00a4943f6c (diff) | |
download | cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.zip cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.tar.gz cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.tar.bz2 |
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
Diffstat (limited to 'Lib/lib-tk/turtle.py')
-rw-r--r-- | Lib/lib-tk/turtle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py index 6a90715..75673a4 100644 --- a/Lib/lib-tk/turtle.py +++ b/Lib/lib-tk/turtle.py @@ -2499,7 +2499,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) |