1
0
Fork 1
forked from suyu/suyu

android: Do not update FPS text on null view

This commit is contained in:
Charles Lombardo 2023-03-31 21:55:08 -04:00 committed by bunnei
parent d30103b69f
commit 8b99a1e49b

View file

@ -229,7 +229,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
val SPEED = 3
perfStatsUpdater = {
val perfStats = NativeLibrary.GetPerfStats()
if (perfStats[FPS] > 0) {
if (perfStats[FPS] > 0 && _binding != null) {
binding.showFpsText.text = String.format("FPS: %.1f", perfStats[FPS])
}