2
0
Fork 0

Fix calling `TextureStorage::texture_3d_update()` could cause a crash

(cherry picked from commit ebd2b9e299)
4.0
Rindbee 2023-06-29 16:03:21 +07:00 committed by Yuri Sizov
parent e75e104e2d
commit 5ef5ff00a4
1 changed files with 2 additions and 2 deletions

@ -1153,8 +1153,8 @@ void TextureStorage::texture_3d_update(RID p_texture, const Vector<Ref<Image>> &
image = image->duplicate();
image->convert(tex->validated_format);
}
all_data_size += images[i]->get_data().size();
images.push_back(image);
all_data_size += image->get_data().size();
images.write[i] = image;
}
all_data.resize(all_data_size); //consolidate all data here