Skip to content

Commit

Permalink
Add null check for image.getFormat()
Browse files Browse the repository at this point in the history
Under some conditions, an Image might have no associated format. This
will be the case for ROMIO pixel buffer e.g. created by scripts or
OMERO pyramid pixel buffer  created by the PixelService for large
images without resolutions.
  • Loading branch information
sbesson committed May 17, 2024
1 parent 543d061 commit edaa976
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ protected ZarrPixelBuffer createOmeNgffPixelBuffer(Pixels pixels) {
String uri = getUri(image);
if (uri == null) {
// Quick exit if we think we're OME-NGFF but there is no URI
if ("OMEXML".equals(image.getFormat().getValue())) {
if (image.getFormat() != null && "OMEXML".equals(image.getFormat().getValue())) {
throw new LockTimeout("Import in progress.", 15*1000, 0);
}
log.debug("No OME-NGFF root");
Expand Down

0 comments on commit edaa976

Please sign in to comment.