diff --git a/app/src/main/java/xtr/keymapper/server/InputService.java b/app/src/main/java/xtr/keymapper/server/InputService.java index 09932c30..21ef60e6 100644 --- a/app/src/main/java/xtr/keymapper/server/InputService.java +++ b/app/src/main/java/xtr/keymapper/server/InputService.java @@ -102,14 +102,14 @@ public IRemoteServiceCallback getCallback() { } public void moveCursorX(float x) { - cursorView.setX(x); + if(cursorView != null) cursorView.setX(x); // To avoid conflict with touch input when moving virtual pointer if (input.pointerCount < 1) cursorSetX((int) x); else if (input.pointerCount == 1 && pointerUp) cursorSetX((int) x); } public void moveCursorY(float y) { - cursorView.setY(y); + if(cursorView != null) cursorView.setY(y); // To avoid conflict with touch input when moving virtual pointer if (input.pointerCount < 1) cursorSetY((int) y); else if (input.pointerCount == 1 && pointerUp) cursorSetY((int) y);