summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJFonS <JFonS@users.noreply.github.com>2022-06-26 12:30:19 +0200
committerGitHub <noreply@github.com>2022-06-26 12:30:19 +0200
commit12459ab334d319904810e35034642a59d056a043 (patch)
treee350837feabeb17c903cb537de9389c02164de70
parent16b23ee37286a69d2a4a460ffd98e80ce835ce59 (diff)
parenta5c01dc25acbbda6575f31e5904c1ff71197e322 (diff)
downloadredot-engine-12459ab334d319904810e35034642a59d056a043.tar.gz
Merge pull request #62124 from holgac/bugfix-62096
Fixes #62096: LightmapGIData::_get_light_textures_data crash on empty image
-rw-r--r--scene/3d/lightmap_gi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index 74ac96c6cc..abe942b97a 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -116,7 +116,7 @@ void LightmapGIData::_set_light_textures_data(const Array &p_data) {
Array LightmapGIData::_get_light_textures_data() const {
Array ret;
- if (light_texture.is_null()) {
+ if (light_texture.is_null() || light_texture->get_layers() == 0) {
return ret;
}