From 97e6f285e812c418867f71fe53ea56cfce2d5bee Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 17 Sep 2024 20:31:37 +0300 Subject: [PATCH] Solved crash due to race condition (#12225) --- .../unciv/ui/components/tilegroups/layers/TileLayerOverlay.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerOverlay.kt b/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerOverlay.kt index f529dcc2e9..af914de1bd 100644 --- a/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerOverlay.kt +++ b/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerOverlay.kt @@ -42,7 +42,7 @@ class TileLayerOverlay(tileGroup: TileGroup, size: Float) : TileLayer(tileGroup, addActor(crosshair) determineVisibility() } - crosshair!!.color.a = alpha + crosshair?.color?.a = alpha } fun hideCrosshair() { @@ -58,7 +58,7 @@ class TileLayerOverlay(tileGroup: TileGroup, size: Float) : TileLayer(tileGroup, addActor(highlight) determineVisibility() } - highlight!!.color = color.cpy().apply { a = alpha } + highlight?.color = color.cpy().apply { a = alpha } } fun hideHighlight() {