diff options
author | Gilles Debunne <debunne@google.com> | 2010-08-26 10:58:58 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-26 10:58:58 -0700 |
commit | 1b400c7763e63505bafd496953764c3e97c2be5b (patch) | |
tree | 3e08cd643cfbae09c7b86785b765855e13b3e407 /core/java/android/widget/TextView.java | |
parent | 1c045003788725b40af5489149ac0fc8bfebb1ea (diff) | |
parent | df4ee43062281ee9cf908a7c45b269738bd017d3 (diff) | |
download | frameworks_base-1b400c7763e63505bafd496953764c3e97c2be5b.zip frameworks_base-1b400c7763e63505bafd496953764c3e97c2be5b.tar.gz frameworks_base-1b400c7763e63505bafd496953764c3e97c2be5b.tar.bz2 |
Merge "Fix for NPE in TextView." into gingerbread
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r-- | core/java/android/widget/TextView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 2f76bd0..8ab8f9d 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7117,6 +7117,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener int selectionStart, selectionEnd; + // selectionModifierCursorController is not null at that point SelectionModifierCursorController selectionModifierCursorController = ((SelectionModifierCursorController) mSelectionModifierCursorController); int minOffset = selectionModifierCursorController.getMinTouchOffset(); @@ -7140,6 +7141,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } private String getWordForDictionary() { + if (mSelectionModifierCursorController == null) { + return null; + } + int offset = ((SelectionModifierCursorController) mSelectionModifierCursorController). getMinTouchOffset(); |