diff options
Diffstat (limited to 'servers/visual/visual_server_scene.cpp')
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 76ff6265cc..ae95fe386d 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -711,7 +711,9 @@ void VisualServerScene::instance_set_use_lightmap(RID p_instance, RID p_lightmap instance->lightmap = p_lightmap; } - VSG::scene_render->instance_custom_data_update_lightmap(instance); + if (instance->custom_data) { + VSG::scene_render->instance_custom_data_update_lightmap(instance); + } } void VisualServerScene::instance_set_custom_aabb(RID p_instance, AABB p_aabb) { |