Fixed NPE in map controls

This commit is contained in:
Denis 2014-12-22 13:05:24 +02:00
parent 15ca02abbf
commit 6b7474601b

View file

@ -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);
if (layout.getHandler() != null){
layout.getHandler().post(new Runnable() { layout.getHandler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
layout.removeView(b); layout.removeView(b);
} }
}); });
}
mapActivity.accessibleContent.remove(b); mapActivity.accessibleContent.remove(b);
} }