1
0
Fork 0

Merge pull request #100593 from Namey5/lightmapgi-null-sky-crash

LightmapGI: Fix crash during baking when sky is null
This commit is contained in:
Thaddeus Crews 2024-12-19 20:00:14 -06:00
commit e51ab56f9a
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
if (use_cube_map) {
Ref<Image> panorama = sky_bake_panorama(environment_get_sky(p_env), environment_get_bg_energy_multiplier(p_env), p_bake_irradiance, p_size);
if (use_ambient_light) {
if (use_ambient_light && panorama.is_valid()) {
for (int x = 0; x < p_size.width; x++) {
for (int y = 0; y < p_size.height; y++) {
panorama->set_pixel(x, y, ambient_color.lerp(panorama->get_pixel(x, y), ambient_color_sky_mix));