diff options
author | David Schweinsberg <[email protected]> | 2007-01-31 01:49:18 +0000 |
---|---|---|
committer | David Schweinsberg <[email protected]> | 2007-01-31 01:49:18 +0000 |
commit | ad4d4d0034d36cdb06cd146f65b758316716066e (patch) | |
tree | 96c8b0057a8ede878f909b466252446622a92d6e /src | |
parent | 942ba880d960637f1890a41d4630eaf7ea24a70d (diff) |
Fixed a bug for when 'readTable' is asked for a table that doesn't exist.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/java/dev/typecast/ot/OTFont.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/java/dev/typecast/ot/OTFont.java b/src/net/java/dev/typecast/ot/OTFont.java index 3168b62..d232284 100644 --- a/src/net/java/dev/typecast/ot/OTFont.java +++ b/src/net/java/dev/typecast/ot/OTFont.java @@ -72,7 +72,7 @@ import net.java.dev.typecast.ot.table.TableFactory; /** * The TrueType font. - * @version $Id: OTFont.java,v 1.5 2007-01-31 01:19:22 davidsch Exp $ + * @version $Id: OTFont.java,v 1.6 2007-01-31 01:49:18 davidsch Exp $ * @author <a href="mailto:[email protected]">David Schweinsberg</a> */ public class OTFont { @@ -179,6 +179,9 @@ public class OTFont { int tag) throws IOException { dis.reset(); DirectoryEntry entry = _tableDirectory.getEntryByTag(tag); + if (entry == null) { + return null; + } dis.skip(tablesOrigin + entry.getOffset()); return TableFactory.create(_fc, this, entry, dis); } |