Skip to content

Commit 9aaca77

Browse files
committed
Fix TextViewUtils.selectLines.hasFocus() - Crash on rotate to landscape, closes #2655, by @gsantner
1 parent 0f5361c commit 9aaca77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ public static void selectLines(final EditText edit, final Integer... positions)
278278
* @param positions: Line indices to select
279279
*/
280280
public static void selectLines(final EditText edit, final List<Integer> positions) {
281+
if (edit == null) {
282+
return;
283+
}
281284
if (!edit.hasFocus()) {
282285
edit.requestFocus();
283286
}

0 commit comments

Comments
 (0)