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);
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);
} }