You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Avoid crash when CanvasTexture used with light decal atlas
The decal atlas is used for Light2Ds, decals, and Light3Ds
This commit is contained in:
@@ -1550,6 +1550,9 @@ void RendererCanvasRenderRD::light_set_texture(RID p_rid, RID p_texture) {
|
||||
if (cl->texture == p_texture) {
|
||||
return;
|
||||
}
|
||||
|
||||
ERR_FAIL_COND(p_texture.is_valid() && !texture_storage->owns_texture(p_texture));
|
||||
|
||||
if (cl->texture.is_valid()) {
|
||||
texture_storage->texture_remove_from_decal_atlas(cl->texture);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user