From f0780479c20599f7d3b81161c237a1114fcf04ea Mon Sep 17 00:00:00 2001 From: Alula <6276139+alula@users.noreply.github.com> Date: Wed, 28 Apr 2021 00:39:07 +0200 Subject: [PATCH] fix crashes on certain old android devices --- src/framework/backend_glutin.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/framework/backend_glutin.rs b/src/framework/backend_glutin.rs index c518047..b1c3c6b 100644 --- a/src/framework/backend_glutin.rs +++ b/src/framework/backend_glutin.rs @@ -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)) } }