diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 6b47c29382a..d0a6542fe48 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -1387,7 +1387,7 @@ void RendererViewport::viewport_set_sdf_oversize_and_scale(RID p_viewport, RS::V RID RendererViewport::viewport_find_from_screen_attachment(DisplayServer::WindowID p_id) const { RID *rids = nullptr; uint32_t rid_count = viewport_owner.get_rid_count(); - rids = (RID *)alloca(sizeof(RID *) * rid_count); + rids = (RID *)alloca(sizeof(RID) * rid_count); viewport_owner.fill_owned_buffer(rids); for (uint32_t i = 0; i < rid_count; i++) { Viewport *viewport = viewport_owner.get_or_null(rids[i]);