You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/08/15 16:52:59 UTC

[hop] branch master updated: HOP-4116: NPE when closing an unsaved file

This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new b86ab24cf6 HOP-4116: NPE when closing an unsaved file
     new dbc4b8b073 Merge pull request #1631 from shlxue/master
b86ab24cf6 is described below

commit b86ab24cf673a86302f7169674a831818b3b3833
Author: Shl Xue <xu...@gmail.com>
AuthorDate: Sat Aug 13 14:16:47 2022 +0800

    HOP-4116: NPE when closing an unsaved file
---
 .../perspective/dataorch/HopDataOrchestrationPerspective.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
index 44caca276c..ddaeccd61b 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/dataorch/HopDataOrchestrationPerspective.java
@@ -269,8 +269,10 @@ public class HopDataOrchestrationPerspective implements IHopPerspective {
     //
     // Remove the file in refreshDelegate
     try {
-      hopGui.fileRefreshDelegate.remove(
-          HopVfs.getFileObject(typeHandler.getFilename()).getPublicURIString());
+      if (isRemoved && typeHandler.getFilename() != null) {
+        hopGui.fileRefreshDelegate.remove(
+            HopVfs.getFileObject(typeHandler.getFilename()).getPublicURIString());
+      }
     } catch (HopFileException e) {
       hopGui.getLog().logError("Error getting VFS fileObject", e);
     }