Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

backport #13278 to horchata #13281

Merged
merged 1 commit into from
Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,10 @@ public void onLowMemory() {
* @see Style
*/
public void setStyleUrl(@NonNull String url) {
nativeMapView.setStyleUrl(url);
if (nativeMapView != null) {
// null-checking the nativeMapView as it can be mistakenly called after it's been destroyed
nativeMapView.setStyleUrl(url);
}
}

/**
Expand Down Expand Up @@ -606,7 +609,8 @@ private void setOfflineGeometryRegionDefinition(OfflineGeometryRegionDefinition

@Override
protected void onSizeChanged(int width, int height, int oldw, int oldh) {
if (!isInEditMode()) {
if (!isInEditMode() && nativeMapView != null) {
// null-checking the nativeMapView, see #13277
nativeMapView.resizeView(width, height);
}
}
Expand Down