From c87d7b88e303ba816a3317b9421559a5825e38d0 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Mon, 23 May 2022 14:40:37 +0300 Subject: [PATCH] DefaultPasteHandler causes NPE if copied data is missing gitlab #844 Change-Id: If55b61c0890187212df3a0026880fbdc437a0e09 --- .../simantics/db/layer0/adapter/impl/DefaultPasteHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/DefaultPasteHandler.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/DefaultPasteHandler.java index 44aea9ad9..2f1ca6d1b 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/DefaultPasteHandler.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/DefaultPasteHandler.java @@ -163,7 +163,7 @@ public class DefaultPasteHandler extends PasteHandlerAdapter { result.addAll(pasteObject(graph, object, handler)); if (cut != null) cuts.addAll(cut); - } else { + } else if (cut != null) { Layer0 L0 = Layer0.getInstance(graph); for(Resource r : cut) { graph.deny(r, L0.PartOf); -- 2.47.1