You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a reference to a node that is then deleted with queue_free() which causes the reference to be set to null. The debugger tells me this reference is now however it still passes an if condition as if it were not null. Directly comparing it to null has the expected result (ie. freed_reference == null -> true) however just testing the reference itself does not (ie. if freed_reference: -> passes).
Steps to reproduce
Add a node to the scene and attach the following script.
extends Node
var freed_node: Node = null
func _ready():
freed_node = Node.new()
func _process(delta):
if freed_node != null:
freed_node.queue_free() #Breakpoint here will be hit one time only, as expected
return
if freed_node:
pass #Breakpoint here should never be hit but is
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)
Issue description
I have a reference to a node that is then deleted with queue_free() which causes the reference to be set to null. The debugger tells me this reference is now however it still passes an if condition as if it were not null. Directly comparing it to null has the expected result (ie. freed_reference == null -> true) however just testing the reference itself does not (ie. if freed_reference: -> passes).
Steps to reproduce
Add a node to the scene and attach the following script.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: