From 38147da8198162d1a48775dfd9da6cff598d557a Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 21 Feb 2020 08:51:57 +0800 Subject: Fixes crash when saving scene --- servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp index 9e3335b05b..a13e7d786b 100644 --- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp +++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp @@ -3208,9 +3208,9 @@ Vector RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { Vector buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); Vector ret; - ret.resize(multimesh->instances); + ret.resize(multimesh->instances * multimesh->stride_cache); { - float *w = multimesh->data_cache.ptrw(); + float *w = ret.ptrw(); const uint8_t *r = buffer.ptr(); copymem(w, r, buffer.size()); } -- cgit v1.2.3