Fixes crash when saving scene

This commit is contained in:
Haoyu Qiu 2020-02-21 08:51:57 +08:00
parent 43725691b9
commit 38147da819

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