![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Kaan Alpar |
I have a variable called current_level which is set to the current level if I have one, and it is set to null if I don’t have one. When I change levels I first check if current_level is null or not. If it’s null I don’t do anything and if it’s not null I free it so I can load a new level. This logic some times works as expected but some times crashes unexpectedly.
I’m clearly checking if current_level != null: current_level.queue_free(). And even though current_level is NULL Godot tries to run queue_free and it crashes. Any ideas?
Where does current_level
get set? It does not appear to be set at the point where you load a new level…
jgodfrey | 2020-05-21 01:20