diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-09-13 19:53:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-13 19:53:09 +0200 |
commit | de465c41dc1a63e1a984b09e790fcc87eff21535 (patch) | |
tree | 621c42fc2546407cf2194cffcb0fdd7f0758c77b | |
parent | d2b1326562e484c8fe587c2725b1701534caada8 (diff) | |
parent | 38147da8198162d1a48775dfd9da6cff598d557a (diff) |
Merge pull request #36407 from timothyqiu/maybe-copy-paste-error
Fixes crash when saving scene
-rw-r--r-- | servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp | 4 |
1 files 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<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); Vector<float> 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()); } |