Fix NPE in CandidateView.offsetMargin

Bug: 4609124
Change-Id: I14913afba80732e6beb8458b404001798a221a79
This commit is contained in:
Tadashi G. Takaoka 2011-06-15 10:48:53 +09:00
parent 86e815a142
commit 862e05a8f0

View file

@ -363,6 +363,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
}
private static void offsetMargin(View v, int dx, int dy) {
if (v == null)
return;
ViewGroup.LayoutParams lp = v.getLayoutParams();
if (lp instanceof ViewGroup.MarginLayoutParams) {
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams)lp;