Crazy-Marvin / Morse

Translator for converting text into morse code and vice-versa
https://crazymarvin.com/morse/
Apache License 2.0
159 stars 31 forks source link

Fix NPE when releasing camera #161

Closed fejd closed 1 year ago

fejd commented 1 year ago

When tapping rapidly on the telegraph key, the camera is released, either directly or delayed via a posted Runnable. When tapping rapidly, the delayed runnable would run after a synchronous release of the camera, in a state where the camera would be null.

Extract open and release of the camera to two methods and protect the release with a null check.

Also update the Gradle wrapper to 8.0 to be compatible with the latest stable version of Android Studio (Giraffe).

CrazyMarvin commented 1 year ago

Thank you very much for your support, @fejd! 😘