In the Arrow scene, check whether source exists before using it

This commit is contained in:
Sebastian Morr 2020-10-13 13:06:22 +02:00
parent ad5d5836d6
commit 0da9bd3193

View file

@ -14,6 +14,9 @@ func _process(_delta):
#position = -repository.objects[source].position #position = -repository.objects[source].position
position = Vector2(0,0) position = Vector2(0,0)
if not (repository and repository.objects.has(source)):
return
var start = repository.objects[source].position var start = repository.objects[source].position
var end = start + Vector2(0, 60) var end = start + Vector2(0, 60)