From dde2825bdec556c832e22dc240c449ce26b9e2e8 Mon Sep 17 00:00:00 2001 From: Francois Belair Date: Thu, 16 Jan 2020 11:08:23 -0500 Subject: [PATCH] Fix divide by 0 bug in FollowPath demo --- project/demos/FollowPath/Drawer.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/demos/FollowPath/Drawer.gd b/project/demos/FollowPath/Drawer.gd index 52a6c19..0f8e912 100644 --- a/project/demos/FollowPath/Drawer.gd +++ b/project/demos/FollowPath/Drawer.gd @@ -22,7 +22,8 @@ func _unhandled_input(event: InputEvent) -> void: update() elif not event.pressed: drawing = false - _simplify() + if active_points.size() >= 2: + _simplify() func _draw() -> void: