diff options
author | Gordon MacPherson <gordon@gordonite.tech> | 2022-10-26 19:33:35 +0100 |
---|---|---|
committer | Gordon MacPherson <gordon@gordonite.tech> | 2022-10-26 19:33:35 +0100 |
commit | 56df8d5f198a2ff0c1da0a9e46bedb0eb2db2813 (patch) | |
tree | 2c5b3e03019c4152428e0cab56ecd116c1b5cba8 /servers/rendering/renderer_rd/forward_mobile | |
parent | 040f49ed6e71a6e7f23d763c4b56095cbf319ef7 (diff) |
Fix EXE_BAD_ACCESS caused by optional argument
This argument is now non optional, but this never hits the same bad access.
I voted to simplify the code here since the argument is never used optionally in our codebase.
Diffstat (limited to 'servers/rendering/renderer_rd/forward_mobile')
-rw-r--r-- | servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index 2dfdb302dc..f76d016ae7 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -1830,8 +1830,8 @@ void RenderForwardMobile::_fill_render_list(RenderListType p_render_list, const distance = 1.0; } - uint32_t indices; - surf->lod_index = mesh_storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->scene_data->lod_distance_multiplier, p_render_data->scene_data->screen_mesh_lod_threshold, &indices); + uint32_t indices = 0; + surf->lod_index = mesh_storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->scene_data->lod_distance_multiplier, p_render_data->scene_data->screen_mesh_lod_threshold, indices); if (p_render_data->render_info) { indices = _indices_to_primitives(surf->primitive, indices); if (p_render_list == RENDER_LIST_OPAQUE) { //opaque |