From 956103b6464c1bd75b935fd4b1f99c98f0f7e5ba Mon Sep 17 00:00:00 2001 From: Piyush Aggarwal Date: Fri, 16 Jul 2021 05:10:25 +0530 Subject: [PATCH] mousereceiver: add nullptr check --- .../Plugins/MouseReceiverPlugin/MouseReceiverService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin/MouseReceiverService.java b/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin/MouseReceiverService.java index df3fbcf8..1e2dd411 100644 --- a/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin/MouseReceiverService.java +++ b/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin/MouseReceiverService.java @@ -223,6 +223,9 @@ public class MouseReceiverService extends AccessibilityService { public boolean stopSwipe() { Path path = new Path(); path.moveTo(getX(), getY()); + if (swipeStoke == null) { + return true; + } swipeStoke = swipeStoke.continueStroke(path, 0, 1, false); GestureDescription.Builder builder = new GestureDescription.Builder(); builder.addStroke(swipeStoke);