diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 5ef1d7503..481092c92 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -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;