Skip to content

Fix NRE when deleting a texture or sprite in the Editor - #366

Merged
michaelsakharov merged 1 commit into
ProwlEngine:mainfrom
Acissathar:sprite-and-texture-race-condition
Aug 28, 2026
Merged

Fix NRE when deleting a texture or sprite in the Editor#366
michaelsakharov merged 1 commit into
ProwlEngine:mainfrom
Acissathar:sprite-and-texture-race-condition

Conversation

@Acissathar

Copy link
Copy Markdown
Contributor

Trying to delete a sprite/texture in the Editor usually gives me a null reference that crashes the editor (it does still delete). Issue was they were using old null check instead of Valid/NotValid

@michaelsakharov

Copy link
Copy Markdown
Contributor

== and !=
Shooouuld actually be okay to use, the Analyzer should catch anything at fault.
I think the real issue you caught here, was the old code was checking the AssetRef for null, not the asset itself.

Nice find! Thanks!

@michaelsakharov
michaelsakharov merged commit 413aafe into ProwlEngine:main Aug 28, 2026
@Acissathar
Acissathar deleted the sprite-and-texture-race-condition branch August 28, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants