[android] - null check source before removing

This commit is contained in:
Łukasz Paczos
2018-04-27 12:24:32 +02:00
committed by Tobrun
parent 8bf1ff1b36
commit 9522674c42
2 changed files with 19 additions and 1 deletions

View File

@@ -752,9 +752,13 @@ final class NativeMapView {
return null;
}
Source source = getSource(sourceId);
return removeSource(source);
if (source != null) {
return removeSource(source);
}
return null;
}
@Nullable
public Source removeSource(@NonNull Source source) {
if (isDestroyedOn("removeSource")) {
return null;