[libbluray-devel] Log failures when loading .bdjo file

hpi1 git at videolan.org
Fri Nov 28 10:45:42 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Nov 28 11:42:38 2014 +0200| [5891506c8cc0b0bf7d086851a0560ac37c926391] | committer: hpi1

Log failures when loading .bdjo file

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

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

diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index 90219d5..0f30a0e 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -330,8 +330,19 @@ JNIEXPORT jobject JNICALL Java_org_videolan_Libbluray_getBdjoN(JNIEnv * env,
                                                                jclass cls, jlong np, jstring jpath) {
 
     (void)np;
+
     const char *path = (*env)->GetStringUTFChars(env, jpath, NULL);
+    if (!path) {
+        BD_DEBUG(DBG_JNI | DBG_CRIT, "getBdjoN() failed: no path\n");
+        return NULL;
+    }
+    BD_DEBUG(DBG_JNI, "getBdjoN(%s)\n", path);
+
     jobject bdjo = bdjo_get(env, path);
+    if (!bdjo) {
+        BD_DEBUG(DBG_JNI | DBG_CRIT, "getBdjoN(%s) failed\n", path);
+    }
+
     (*env)->ReleaseStringUTFChars(env, jpath, path);
 
     return bdjo;



More information about the libbluray-devel mailing list