diff options
| author | Gilles Debunne <debunne@google.com> | 2011-08-25 13:45:11 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-25 13:45:11 -0700 |
| commit | 8e7e95f22f700fae6926d87b25c388bf9b509389 (patch) | |
| tree | 2c2d286f84084bd1e0eec1004a8903ca98d8110c /core/java/android | |
| parent | 463854bead24c951932d1d8c31e4f22cbce983fb (diff) | |
| parent | fd419b051a43c68b28131d1fd4535af0d21b5039 (diff) | |
Merge "Bug 5166707: NPE fixed in getFocusedRect"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/widget/TextView.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 2b94417aefc9..c92b5f9f5bb3 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -4788,8 +4788,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener selEnd = getSelectionEnd(); if (selStart >= 0) { - if (mHighlightPath == null) - mHighlightPath = new Path(); + if (mHighlightPath == null) mHighlightPath = new Path(); if (selStart == selEnd) { if (isCursorVisible() && @@ -4995,6 +4994,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } else { // Selection extends across multiple lines -- the focused // rect covers the entire width. + if (mHighlightPath == null) mHighlightPath = new Path(); if (mHighlightPathBogus) { mHighlightPath.reset(); mLayout.getSelectionPath(selStart, selEnd, mHighlightPath); |
