From 54ceed9ddf25f231897f4d0ff37d0043274bc408 Mon Sep 17 00:00:00 2001 From: Tatu Lund Date: Mon, 9 Sep 2019 10:11:10 +0300 Subject: Removal of data communicator needs to happen before call to super.remove() (#11710) Removal of data communicator needs to happen before call to super.remove() since super.remove() sets parent to null causing the NPE. Fixes https://github.com/vaadin/framework/issues/11617 --- .../src/main/java/com/vaadin/ui/components/grid/GridDragSource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java index 540d8f2d8a..e6f8ed2926 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java @@ -256,10 +256,10 @@ public class GridDragSource extends DragSourceExtension> { @Override public void remove() { - super.remove(); - getParent().getDataCommunicator() .removeDataGenerator(dragDataGenerator); + + super.remove(); } @Override -- cgit v1.2.3