[android] Fix some NullPointer.

This commit is contained in:
vng 2012-06-26 02:37:05 -07:00 committed by Alex Zolotarev
parent 22d6135ed5
commit cf64d60ccc
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ public class ArrowImage extends ImageView
if (m_angle < 0.0)
{
canvas.drawCircle(w/2, h/2, Math.min(w/2, h/2), m_paint);
canvas.drawCircle(w/2, h/2, Math.min(w/2, h/2) - 5, m_paint);
}
else
{

View file

@ -158,7 +158,7 @@ public class SearchActivity extends ListActivity implements LocationService.List
{
holder.m_flag.setVisibility(View.VISIBLE);
if (r.m_flag.length() > 0 && r.m_azimut < 0.0)
if (r.m_flag != null && r.m_flag.length() > 0 && r.m_azimut < 0.0)
holder.m_flag.setFlag(m_context.getResources(), r.m_flag);
else
holder.m_flag.setAzimut(r.m_azimut);