[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 86a2e93294
commit 4db617c7a9
2 changed files with 19 additions and 1 deletions

View File

@@ -759,9 +759,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;