[libbluray-devel] BDFontMetrics.getFontList(): return empty list if font resolving fails

hpi1 git at videolan.org
Tue Dec 1 13:21:42 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Dec  1 13:36:41 2015 +0200| [5e4f25267026d36f686d6b0a8d19aebc1d8a43fb] | committer: hpi1

BDFontMetrics.getFontList(): return empty list if font resolving fails

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5e4f25267026d36f686d6b0a8d19aebc1d8a43fb
---

 src/libbluray/bdj/java/java/awt/BDFontMetrics.java |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index d2a91dc..fdcda44 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -192,7 +192,12 @@ public class BDFontMetrics extends sun.font.FontDesignMetrics {
     }
 
     static synchronized String[] getFontList() {
-        init();
+        try {
+            init();
+        } catch (Throwable t) {
+            System.err.println("getFontList() failed: " + t);
+            return new String[0];
+        }
 
         ArrayList fontNames = new ArrayList();
 



More information about the libbluray-devel mailing list