[libbluray-devel] Check for null

hpi1 git at videolan.org
Mon Oct 27 10:38:23 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Sep 15 14:19:35 2014 +0300| [eff665b49ca49445ebc103ecee78f2f8cb0ea006] | committer: hpi1

Check for null

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

 src/libbluray/bdj/java/org/havi/ui/HDefaultTextLayoutManager.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libbluray/bdj/java/org/havi/ui/HDefaultTextLayoutManager.java b/src/libbluray/bdj/java/org/havi/ui/HDefaultTextLayoutManager.java
index 6ca6114..54b2bbc 100644
--- a/src/libbluray/bdj/java/org/havi/ui/HDefaultTextLayoutManager.java
+++ b/src/libbluray/bdj/java/org/havi/ui/HDefaultTextLayoutManager.java
@@ -45,6 +45,8 @@ public class HDefaultTextLayoutManager implements HTextLayoutManager {
                 String[] lines = StrUtil.split(text, '\n');
 
                 Graphics g = hvisible.getGraphics();
+                if (g == null)
+                    continue;
                 FontMetrics fontMetrics = g.getFontMetrics(hvisible.getFont());
                 g.dispose();
 



More information about the libbluray-devel mailing list