Iterate over dictionary's keys while removing stuff from it

This commit is contained in:
Sebastian Morr 2020-09-15 17:23:22 +02:00
parent 47532c9033
commit 390e0f6c11

View file

@ -240,7 +240,7 @@ func remove_gone_stuff():
all[o] = ""
all["HEAD"] = ""
# Delete objects, if they disappeared.
for o in objects:
for o in objects.keys():
if not all.has(o):
objects[o].queue_free()
objects.erase(o)