Skip to content

Commit 641aba6

Browse files
committed
ActionButtonBase _webView null check, by @gsantner
1 parent 38fdf81 commit 641aba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/net/gsantner/markor/format/ActionButtonBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ public void runJumpBottomTopAction(ActionItem.DisplayMode displayMode) {
10121012
if (displayMode == ActionItem.DisplayMode.EDIT) {
10131013
int pos = _hlEditor.getSelectionStart();
10141014
_hlEditor.setSelection(pos == 0 ? _hlEditor.getText().length() : 0);
1015-
} else if (displayMode == ActionItem.DisplayMode.VIEW) {
1015+
} else if (displayMode == ActionItem.DisplayMode.VIEW && _webView != null) {
10161016
boolean top = _webView.getScrollY() > 100;
10171017
_webView.scrollTo(0, top ? 0 : _webView.getContentHeight());
10181018
if (!top) {

0 commit comments

Comments
 (0)