diff options
author | Radiant <69520693+RadiantUwU@users.noreply.github.com> | 2024-08-31 22:31:43 +0300 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-17 08:57:43 +0200 |
commit | af8caffd0e4aad00f8101546ebe8f7036581db26 (patch) | |
tree | 89d860f28d867bbb8b134d4000b5c7d634bf2c86 /drivers/gles3 | |
parent | ec20c3ff765ff094c4475b5219dc8de5467a00b6 (diff) | |
download | redot-engine-af8caffd0e4aad00f8101546ebe8f7036581db26.tar.gz |
Fix shadow mesh recursion.
(cherry picked from commit 70860aafd8acbb4af34941f1343a7ea5901a6c4e)
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/storage/mesh_storage.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 89466160c6..b67317c99e 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -743,6 +743,7 @@ String MeshStorage::mesh_get_path(RID p_mesh) const { } void MeshStorage::mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) { + ERR_FAIL_COND_MSG(p_mesh == p_shadow_mesh, "Cannot set a mesh as its own shadow mesh."); Mesh *mesh = mesh_owner.get_or_null(p_mesh); ERR_FAIL_NULL(mesh); |