fix: guard nullable particle layer mix
This commit is contained in:
@@ -145,9 +145,12 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
||||
private fun setTimeMix(value: Float) {
|
||||
val requestedTimeMix = value.coerceIn(0.0f, 1.0f)
|
||||
val layer = maplibreMap.style?.getLayer(PARTICLE_LAYER_ID)
|
||||
if (layer == null) {
|
||||
Log.i(TAG, "ParticleGPU: event=MIX_REJECTED reason=LAYER_NOT_READY styleEpoch=$styleLoadEpoch")
|
||||
return
|
||||
}
|
||||
val rejectReason = when {
|
||||
!styleReady -> "STYLE_LOADING"
|
||||
layer == null -> "LAYER_NOT_READY"
|
||||
!enabled -> "DISABLED"
|
||||
!timeWindowMode -> "TIME_WINDOW_OFF"
|
||||
else -> null
|
||||
|
||||
Reference in New Issue
Block a user