Crash fixes.

This commit is contained in:
Dmitry Yunitsky 2014-07-18 17:22:29 +03:00 committed by Alex Zolotarev
parent a7d6dfbab2
commit de0821e3f2
2 changed files with 2 additions and 2 deletions

View file

@ -547,7 +547,7 @@ class DownloadAdapter extends BaseAdapter
if (v != null)
{
final DownloadAdapter.ViewHolder holder = (DownloadAdapter.ViewHolder) v.getTag();
if (holder != null)
if (holder != null && holder.mProgress != null)
holder.mProgress.setProgress((int) (current * 100 / total));
}
}

View file

@ -330,7 +330,7 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
else if (mCurrentState == State.FULL_PLACEPAGE && state == State.HIDDEN)
hideEverything();
else
throw new IllegalStateException(String.format("Invalid transition %s - > %s", mCurrentState, state));
return;
mCurrentState = state;
}