Fixed NPE in map controls
This commit is contained in:
parent
15ca02abbf
commit
6b7474601b
1 changed files with 10 additions and 6 deletions
|
@ -112,12 +112,16 @@ public abstract class MapControls {
|
||||||
|
|
||||||
protected void removeButton(final FrameLayout layout, final View b) {
|
protected void removeButton(final FrameLayout layout, final View b) {
|
||||||
b.setVisibility(View.GONE);
|
b.setVisibility(View.GONE);
|
||||||
layout.getHandler().post(new Runnable() {
|
|
||||||
@Override
|
if (layout.getHandler() != null){
|
||||||
public void run() {
|
layout.getHandler().post(new Runnable() {
|
||||||
layout.removeView(b);
|
@Override
|
||||||
}
|
public void run() {
|
||||||
});
|
layout.removeView(b);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
mapActivity.accessibleContent.remove(b);
|
mapActivity.accessibleContent.remove(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue