-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An already freed Object
evaluates to true
when used as a condition in if
#44861
Comments
@rakun99 Please upload a minimal reproduction project to make this easier to troubleshoot. |
You are supposed to use
or
That said, this error used to report [deleted object] instead of null. Not sure if this change is intended. EDIT: EDIT2: EDIT 3:
The error: |
IIRC is_instance_valid() can be a fake positive too, so it isn't a fix... |
No, fake positives were fixed in the newest 3.2 releases. |
Well, I used a steering behavior form KidsCanCode demo.
Wow, it worked. Thanks. So problem is solved. |
true
when used as a condition in if
true
when used as a condition in if
Object
evaluates to true
when used as a condition in if
@kleonc The screenshot you posted looks correct. The error reports the object as 'previously freed'. |
Oh, so the only issue in here is the error message saying "null instance" instead of something like "previously freed"? |
Well, the behavior is unintuitive, but the idea is that you have to use |
This is not a bug and from the discussion on #59816, it is expected behavior that |
Godot version:
3.2.4 beta 4
OS/device including version:
Windows 7
Issue description:
Godot sends an error even when I make precaution that target doesn't Null.
I send a bunch of missiles with predefined target. First missile crashes the target and target is queue_freed. Because of that other missiles receive null, but I got an error.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: