Prevent Style.validateState() exception on location state updates (#3574)

This commit is contained in:
Adrian Cojocaru
2025-06-23 19:56:39 +03:00
committed by GitHub
parent 2e0b464849
commit bf4b55727d
2 changed files with 5 additions and 1 deletions

View File

@@ -245,6 +245,10 @@ final class SymbolLocationLayerRenderer implements LocationLayerRenderer {
}
private void setLayerVisibility(@NonNull String layerId, boolean visible) {
if (!style.isFullyLoaded()) {
return;
}
Layer layer = style.getLayer(layerId);
if (layer != null) {
String targetVisibility = visible ? VISIBLE : NONE;