Fixed stack overflow crash when the user set the loop mode to ping-pong and played the animation on a single frame with its own tag

The crash only occured when it was one frame in that tag, but there were also more frames in general. A very rare scenario.
This commit is contained in:
OverloadedOrama 2020-05-09 21:38:28 +03:00
parent 0e807c176f
commit 7dbea9c0b0
2 changed files with 21 additions and 14 deletions

View file

@ -254,6 +254,8 @@ func _input(event : InputEvent) -> void:
if Engine.get_version_info().major == 3 && Engine.get_version_info().minor >= 2:
if event is InputEventMouseMotion:
pen_pressure = event.pressure
# To be removed once Godot 3.2.2 is out of beta
if event.pressure == 0.0: # Drawing with mouse
pen_pressure = 1 # This causes problems with tablets though