From ad3bcd2e0a7b13e75977e9c57e403895d3ca142c Mon Sep 17 00:00:00 2001 From: ardocrat Date: Tue, 14 May 2024 09:31:12 +0300 Subject: [PATCH] android: fix camera stop --- android/app/src/main/java/mw/gri/android/MainActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/mw/gri/android/MainActivity.java b/android/app/src/main/java/mw/gri/android/MainActivity.java index f78e91c..7d6d384 100644 --- a/android/app/src/main/java/mw/gri/android/MainActivity.java +++ b/android/app/src/main/java/mw/gri/android/MainActivity.java @@ -310,7 +310,9 @@ public class MainActivity extends GameActivity { View content = findViewById(android.R.id.content); if (content != null) { content.post(() -> { - mCameraProvider.unbindAll(); + if (mCameraProvider != null) { + mCameraProvider.unbindAll(); + } }); } }