Skip to content

Commit c85ed29

Browse files
committed
FreeFormTool: fixed AttributeError: 'NoneType' object has no attribute 'points'
1 parent 1cb00ec commit c85ed29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plotpy/tools/shape.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def cancel_point(self, filter, event) -> None:
238238
event: The triggering event.
239239
"""
240240
super().cancel_point(filter, event)
241-
self.shape.closed = len(self.shape.points) > 2
241+
if self.shape is not None:
242+
self.shape.closed = len(self.shape.points) > 2
242243

243244
def mouse_press(self, filter, event) -> None:
244245
"""

0 commit comments

Comments
 (0)