Add null check to Projection.getContentPadding() (#3937)

This commit is contained in:
Bart Louwers
2025-11-10 14:11:15 +00:00
committed by GitHub
parent 955b063ef7
commit 16544a039c

View File

@@ -41,7 +41,10 @@ public class Projection {
}
int[] getContentPadding() {
double[] padding = nativeMapView.getCameraPosition().padding;
double[] padding = nativeMapView.getContentPadding();
if (padding == null) {
return new int[] {0, 0, 0, 0};
}
return new int[] {(int) padding[0], (int) padding[1], (int) padding[2], (int) padding[3]};
}