From 914981adaf18153000e8db5307885689cf267f94 Mon Sep 17 00:00:00 2001 From: Marco Jakob Date: Thu, 7 Oct 2021 21:59:53 +0200 Subject: [PATCH] Squashed commit of the following: commit fd2d797fe85a09bce3199ff53376ac95beff3544 Author: Rob Becker Date: Wed Oct 6 20:10:37 2021 -0600 Add null checks to avoid #35 --- lib/src/draggable_manager.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/draggable_manager.dart b/lib/src/draggable_manager.dart index f353022..9d48bb3 100644 --- a/lib/src/draggable_manager.dart +++ b/lib/src/draggable_manager.dart @@ -104,7 +104,7 @@ abstract class _EventManager { void handleEnd(Event event, EventTarget? target, Point? position, Point? clientPosition) { // Set the current position. - if (position != null) { + if (position != null && _currentDrag != null) { _currentDrag!.position = position; }