Add null check to Projection.getContentPadding() (#3937)
This commit is contained in:
@@ -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]};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user