[libbluray-devel] BDFontMetrics.finalize(): Set native font pointer to 0 after releasing it
hpi1
git at videolan.org
Thu Apr 11 14:43:45 CEST 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 11 09:37:49 2013 +0300| [ee4e0f0f288db8f3f5a6929f08f5d4551e822a09] | committer: hpi1
BDFontMetrics.finalize(): Set native font pointer to 0 after releasing it
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ee4e0f0f288db8f3f5a6929f08f5d4551e822a09
---
src/libbluray/bdj/java/java/awt/BDFontMetrics.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index bc793f4..0c6afb1 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -242,7 +242,10 @@ public class BDFontMetrics extends FontMetrics {
}
protected void finalize() throws Throwable {
- destroyFontN(ftFace);
+ if (ftFace != 0) {
+ destroyFontN(ftFace);
+ ftFace = 0;
+ }
super.finalize();
}
}
More information about the libbluray-devel
mailing list