[libbluray-devel] BDJUtil.discRootToFilesystem(): check for null

hpi1 git at videolan.org
Tue Nov 24 09:45:01 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Nov 24 10:17:54 2015 +0200| [5b9b9e943316e0efeb9a0948c21f419c577f7399] | committer: hpi1

BDJUtil.discRootToFilesystem(): check for null

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

 src/libbluray/bdj/java/org/videolan/BDJUtil.java |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJUtil.java b/src/libbluray/bdj/java/org/videolan/BDJUtil.java
index 507c2e7..b5a9864 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJUtil.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJUtil.java
@@ -47,6 +47,11 @@ public class BDJUtil {
      */
     public static String discRootToFilesystem(String path)
     {
-        return System.getProperty("bluray.vfs.root") + path;
+        String vfsRoot = System.getProperty("bluray.vfs.root");
+        if (vfsRoot == null) {
+            System.err.println("discRootToFilesystem(): disc root not set !");
+            return path;
+        }
+        return vfsRoot + path;
     }
 }



More information about the libbluray-devel mailing list