summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-09-13 19:53:09 +0200
committerGitHub <noreply@github.com>2020-09-13 19:53:09 +0200
commitde465c41dc1a63e1a984b09e790fcc87eff21535 (patch)
tree621c42fc2546407cf2194cffcb0fdd7f0758c77b
parentd2b1326562e484c8fe587c2725b1701534caada8 (diff)
parent38147da8198162d1a48775dfd9da6cff598d557a (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.cpp4
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());
}