fix crashes on certain old android devices

This commit is contained in:
Alula 2021-04-28 00:39:07 +02:00
parent 6750cd7ad4
commit f0780479c2
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
1 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,8 @@ fn get_insets() -> GameResult<(f32, f32, f32, f32)> {
let mut elements = [0; 4];
vm_env.get_int_array_region(field, 0, &mut elements)?;
vm_env.delete_local_ref(field.into());
Ok((elements[0] as f32, elements[1] as f32, elements[2] as f32, elements[3] as f32))
}
}