Skip to content

Commit

Permalink
Fixed minor instance error when closing app
Browse files Browse the repository at this point in the history
  • Loading branch information
ninstar committed Dec 21, 2022
1 parent 82c5a77 commit ee69047
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/code/ui/common/buttons/button.gd
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ func _ready() -> void:
func color_change(new_color: Color) -> void:

var _tween: Tween = get_node("Tween")
if _tween != null:
if is_instance_valid(_tween):

_tween.interpolate_property(self, "color_current", color_current, new_color,
0.2, Tween.TRANS_SINE, Tween.EASE_IN_OUT)
_tween.start()
if _tween.is_inside_tree():

_tween.interpolate_property(self, "color_current", color_current, new_color,
0.2, Tween.TRANS_SINE, Tween.EASE_IN_OUT)
_tween.start()

func generate_styleboxes() -> void:

Expand Down

0 comments on commit ee69047

Please sign in to comment.