Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fc946eb authored by Clara Bayarri's avatar Clara Bayarri
Browse files

Editor: Fix crash when selecting text on a non-editable TextView

We are querying the insertion controller, which is null on a
non-editable TextView.

Change-Id: Ie8428c6264385a1283310823c959ecdd63ef5a3f
parent 3af4330c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2954,9 +2954,12 @@ public class Editor {
            }
            mSelectionHandleHeight = Math.max(
                    mSelectHandleLeft.getMinimumHeight(), mSelectHandleRight.getMinimumHeight());
            getInsertionController().getHandle();
            InsertionPointCursorController insertionController = getInsertionController();
            if (insertionController != null) {
                insertionController.getHandle();
                mInsertionHandleHeight = mSelectHandleCenter.getMinimumHeight();
            }
        }

        @Override
        public boolean onCreateActionMode(ActionMode mode, Menu menu) {