mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fixed a rare crash with straight lines
It was possible that the variable `is_making_line` could be true, even if the line itself has been freed from memory.
This commit is contained in:
parent
582b9baedb
commit
ff758467dd
|
@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Fixed bug where, if you had a random brush selected and then selected the pencil tool, "brush color from" did not appear.
|
||||
- Fixed crash on Godot 3.2.beta6 when pressing the Edit Palette button.
|
||||
- The canvas updates automatically when onion skinning settings change.
|
||||
- Fixed a rare crash with straight lines. It was possible that the variable `is_making_line` could be true, even if the line itself has been freed from memory.
|
||||
|
||||
## [v0.6] - 06-01-2020
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ func _input(event : InputEvent) -> void:
|
|||
if is_instance_valid(line_2d):
|
||||
line_2d.queue_free()
|
||||
|
||||
if is_making_line:
|
||||
if is_making_line && is_instance_valid(line_2d):
|
||||
var point0 : Vector2 = line_2d.points[0]
|
||||
var angle := stepify(rad2deg(mouse_pos.angle_to_point(point0)), 0.01)
|
||||
if Input.is_action_pressed("ctrl"):
|
||||
|
|
Loading…
Reference in a new issue