[automerger] Fix crash during cursor moving on BiDi text am: 82c84d5fbb
Change-Id: I221d974ba9402c088235d5bdb3c94e91cf4167ba
This commit is contained in:
@@ -1390,7 +1390,8 @@ public abstract class Layout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float get(final int offset) {
|
float get(final int offset) {
|
||||||
if (mHorizontals == null) {
|
if (mHorizontals == null || offset < mLineStartOffset
|
||||||
|
|| offset >= mLineStartOffset + mHorizontals.length) {
|
||||||
return getHorizontal(offset, mPrimary);
|
return getHorizontal(offset, mPrimary);
|
||||||
} else {
|
} else {
|
||||||
return mHorizontals[offset - mLineStartOffset];
|
return mHorizontals[offset - mLineStartOffset];
|
||||||
|
|||||||
Reference in New Issue
Block a user