mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix surface_get_arrays
returns wrong index array when using empty vertex array
This commit is contained in:
parent
53be3b78d1
commit
05eaafc546
1 changed files with 1 additions and 1 deletions
|
@ -1685,7 +1685,7 @@ Array RenderingServer::_get_array_from_surface(uint64_t p_format, Vector<uint8_t
|
|||
|
||||
Vector<int> arr;
|
||||
arr.resize(p_index_len);
|
||||
if (p_vertex_len <= (1 << 16)) {
|
||||
if (p_vertex_len <= (1 << 16) && p_vertex_len > 0) {
|
||||
int *w = arr.ptrw();
|
||||
|
||||
for (int j = 0; j < p_index_len; j++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue