mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #65326 from timothyqiu/element-check
Fix crash when executing `LightmapGIData._set_light_textures_data`
This commit is contained in:
commit
8287dc8895
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user