From d155dcdeb29e55c32159667229c7f5c37c73d0bb Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 14 May 2024 08:23:36 +0000 Subject: [PATCH] Fix NPE --- .../app/fxcomps/impl/ContextualFileReferenceChoiceComp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java index 2974b662..cdb82ccd 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java @@ -52,7 +52,7 @@ public class ContextualFileReferenceChoiceComp extends Comp> this.fileSystem.setValue(val); }); this.fileSystem.addListener((observable, oldValue, newValue) -> { - fileSystem.setValue(newValue.get().ref()); + fileSystem.setValue(newValue.get() != null ? newValue.get().ref() : null); }); this.filePath = filePath; }