[libbluray-devel] Check for NULL

hpi1 git at videolan.org
Mon Jul 25 17:52:40 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Jul 25 15:26:26 2016 +0300| [0d3fdf151634a45bcee61d21f51696d97d7d1a5e] | committer: hpi1

Check for NULL

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

 src/libbluray/bdj/native/java_awt_BDGraphics.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libbluray/bdj/native/java_awt_BDGraphics.c b/src/libbluray/bdj/native/java_awt_BDGraphics.c
index e228b5d..7fb9e0c 100644
--- a/src/libbluray/bdj/native/java_awt_BDGraphics.c
+++ b/src/libbluray/bdj/native/java_awt_BDGraphics.c
@@ -57,6 +57,9 @@ Java_java_awt_BDGraphics_drawStringN(JNIEnv * env, jobject obj, jlong ftFace, js
     unsigned j, k;
     FT_Face face = (FT_Face)(intptr_t)ftFace;
 
+    if (!face)
+        return;
+
     length = (*env)->GetStringLength(env, string);
     if (length <= 0)
       return;



More information about the libbluray-devel mailing list