Skip to content

Commit

Permalink
guard against null settings
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Meech committed Jul 18, 2024
1 parent b82b6be commit 9f1a200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ public void actionPerformed(ActionEvent e) {
if ( filePath != null ) {
SettingsReader reader = new SettingsReader();
Settings settings = reader.readSettings( filePath );
reader.loadSettings( settings, microtomeManager, microtomePanel, planeManager,
imagesPanel.getImageNameToContent(), otherPanel );
if (settings != null) {
reader.loadSettings(settings, microtomeManager, microtomePanel, planeManager,
imagesPanel.getImageNameToContent(), otherPanel);
}
}

} else if (e.getActionCommand().equals("save_solution")) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/embl/schwab/crosshair/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public static void printImageMinMax (Content imageContent) {
Point3d max = new Point3d();
imageContent.getMax(max);
imageContent.getMin(min);
System.out.println(min.toString());
System.out.println(max.toString());
logger.info(min.toString());
logger.info(max.toString());
}

public static int findIndexOfMaxMin (ArrayList<Double> values, String MinMax) {
Expand Down

0 comments on commit 9f1a200

Please sign in to comment.