[libbluray-devel] BDGraphics: log some new errors

hpi1 git at videolan.org
Mon Jul 25 18:15:50 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Jul 25 15:25:38 2016 +0300| [4b284925dd4bfa527b452bd201f4eb83499c3929] | committer: hpi1

BDGraphics: log some new errors

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

 src/libbluray/bdj/java/java/awt/BDFontMetrics.java  | 5 +++--
 src/libbluray/bdj/java/java/awt/BDGraphicsBase.java | 5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index ce018a7..cdcf87f 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -230,9 +230,10 @@ public class BDFontMetrics extends sun.font.FontDesignMetrics {
         super(font);
 
         ftFace = loadFontN(ftLib, nativeName, font.getSize());
-        if (ftFace == 0)
+        if (ftFace == 0) {
+            logger.error("Error loading font");
             throw new AWTError("font face:" + nativeName + " not loaded");
-
+        }
         widths = null;
     }
 
diff --git a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
index 0e2fd5f..80db4b0 100644
--- a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
+++ b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
@@ -215,6 +215,9 @@ abstract class BDGraphicsBase extends DVBGraphics implements ConstrainableGraphi
         if (font != null && fontMetrics == null) {
             fontMetrics = BDFontMetrics.getFontMetrics(font);
         }
+        if (fontMetrics == null) {
+            logger.error("getFontMetrics() failed");
+        }
         return fontMetrics;
     }
 
@@ -240,6 +243,8 @@ abstract class BDGraphicsBase extends DVBGraphics implements ConstrainableGraphi
     }
 
     public GraphicsConfiguration getDeviceConfiguration() {
+        if (gc == null)
+            logger.error("getDeviceConfiguration() failed");
         return gc;
     }
 



More information about the libbluray-devel mailing list