Skip to content

Commit

Permalink
Throw a more informative exception if vector data is encountered.
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Feb 9, 2009
1 parent d164521 commit 57c2322
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/bio-formats/src/loci/formats/in/PSDReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ protected void initFile(String id) throws FormatException, IOException {
else {
int layerLen = in.readInt();
int layerCount = in.readShort();

if (layerCount <= 0) {
throw new FormatException("Vector data is not supported.");
}

int[] w = new int[layerCount];
int[] h = new int[layerCount];
int[] c = new int[layerCount];
Expand Down

0 comments on commit 57c2322

Please sign in to comment.