diff --git a/components/formats-bsd/src/loci/formats/in/ICSReader.java b/components/formats-bsd/src/loci/formats/in/ICSReader.java index 0513eac024e..c6260c20f29 100644 --- a/components/formats-bsd/src/loci/formats/in/ICSReader.java +++ b/components/formats-bsd/src/loci/formats/in/ICSReader.java @@ -1478,10 +1478,12 @@ else if (labels.equalsIgnoreCase("x y t")) { MetadataTools.populatePixels(store, this, true); // populate Image data - imageName = imageName.replace('/', File.separatorChar); - imageName = imageName.replace('\\', File.separatorChar); - imageName = imageName.substring(imageName.lastIndexOf(File.separator) + 1); - store.setImageName(imageName, 0); + if (imageName != null) { + imageName = imageName.replace('/', File.separatorChar); + imageName = imageName.replace('\\', File.separatorChar); + imageName = imageName.substring(imageName.lastIndexOf(File.separator) + 1); + store.setImageName(imageName, 0); + } if (date != null) store.setImageAcquisitionDate(new Timestamp(date), 0);