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; }