Fix NPE in CandidateView.offsetMargin
Bug: 4609124 Change-Id: I14913afba80732e6beb8458b404001798a221a79
This commit is contained in:
parent
86e815a142
commit
862e05a8f0
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue