Skip to content

Commit

Permalink
Merge pull request #616 from MyersResearchGroup/Hierachy_Issue
Browse files Browse the repository at this point in the history
Fixed nullpointerexception in FileTree that resulted in bug when using
  • Loading branch information
cjmyers authored Apr 21, 2021
2 parents f153c32 + d518ac2 commit ffccbd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ public void valueChanged(TreeSelectionEvent e) {
}
fileLocation = dir.getAbsolutePath() + fileLocation;

// Lukas added :
if(tree.getSelectionPaths() != null) {

fileLocations = new String[tree.getSelectionPaths().length];
int i = 0;
for (TreePath path : tree.getSelectionPaths()) {
Expand All @@ -225,6 +228,7 @@ public void valueChanged(TreeSelectionEvent e) {
i++;
}
}
}
});
tree.addMouseListener(this);
tree.addMouseListener(gui);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
import javax.swing.plaf.basic.BasicTabbedPaneUI;
import javax.swing.text.View;

import com.sun.java.swing.plaf.windows.WindowsIconFactory;
//import com.sun.java.swing.plaf.windows.WindowsIconFactory;

import edu.utah.ece.async.ibiosim.gui.Gui;
import edu.utah.ece.async.ibiosim.gui.ResourceManager;
Expand Down

0 comments on commit ffccbd3

Please sign in to comment.