Issue #21868: Prevent turtle crash due to invalid undo buffer size.
This commit is contained in:
parent
e2d1e64a1f
commit
b606d45fb2
|
@ -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)
|
||||
|
|
|
@ -235,6 +235,7 @@ Ingrid Cheung
|
|||
Albert Chin-A-Young
|
||||
Adal Chiriliuc
|
||||
Matt Chisholm
|
||||
Lita Cho
|
||||
Anders Chrigström
|
||||
Tom Christiansen
|
||||
Renee Chu
|
||||
|
|
|
@ -16,6 +16,9 @@ Library
|
|||
- Issue #22017: Correct reference counting errror in the initialization of the
|
||||
_warnings module.
|
||||
|
||||
- Issue #21868: Prevent turtle crash when undo buffer set to a value less
|
||||
than one.
|
||||
|
||||
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
|
||||
attribute. Based on patch by Martin Panter.
|
||||
|
||||
|
|
Loading…
Reference in New Issue