diff options
author | Clay John <claynjohn@gmail.com> | 2022-09-04 07:29:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 07:29:43 -0700 |
commit | 8287dc8895073b7488bb186b3f39f0dd26b3d7cc (patch) | |
tree | a295c3057865f45174d9daa84659f11cff891123 /scene | |
parent | 733e0be8ecc2c361f6d17139efd9d4966256afe6 (diff) | |
parent | f0f24b9a62a223f363c610d7f6676e8f2b92f247 (diff) |
Merge pull request #65326 from timothyqiu/element-check
Fix crash when executing `LightmapGIData._set_light_textures_data`
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/lightmap_gi.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 32c112d21f..b0bccc4571 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -105,6 +105,7 @@ void LightmapGIData::_set_light_textures_data(const Array &p_data) { Vector<Ref<Image>> images; for (int i = 0; i < p_data.size(); i++) { Ref<TextureLayered> texture = p_data[i]; + ERR_FAIL_COND_MSG(texture.is_null(), vformat("Invalid TextureLayered at index %d.", i)); for (int j = 0; j < texture->get_layers(); j++) { images.push_back(texture->get_layer_data(j)); } |