summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Victoria Lease <violets@google.com> 2014-01-15 15:15:03 -0800
committer Victoria Lease <violets@google.com> 2014-01-15 15:16:30 -0800
commitd849f546db7a95d4fa0c4c2ed2323c5e64ff7ead (patch)
tree0567f71893c9c321a9a735ad95c2e8b26c695964
parenta6198d37fcd52884308058573aecbd5e1add0361 (diff)
check for null mEditor in TextView.canCopy()
canSelectText(), canCut(), and canPaste() do it, too! canCopy() wants to be cool like them! Bug: 11388122 Change-Id: I8595effbff269c05ac3f763419298970045ba054
-rw-r--r--core/java/android/widget/TextView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 5d42589ff044..aa8bbb276882 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8481,7 +8481,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return false;
}
- if (mText.length() > 0 && hasSelection()) {
+ if (mText.length() > 0 && hasSelection() && mEditor != null) {
return true;
}