Merge pull request #36407 from timothyqiu/maybe-copy-paste-error

Fixes crash when saving scene
This commit is contained in:
Rémi Verschelde 2020-09-13 19:53:09 +02:00 committed by GitHub
commit de465c41dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}