[libbluray-devel] Check for null

hpi1 git at videolan.org
Sun Aug 21 15:06:49 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Aug 21 15:58:26 2016 +0300| [efcde25b3bd58eee9cb96f151b79a585a52a09ff] | committer: hpi1

Check for null

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

 src/libbluray/bdj/java/org/videolan/Libbluray.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index 4d1201a..3bc0143 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -124,8 +124,12 @@ public class Libbluray {
             System.err.println("Cache creation failed: " + e);
             /* not fatal with most discs */
         }
-        persistentRoot = canonicalize(persistentRoot, true);
-        budaRoot       = canonicalize(budaRoot, true);
+        if (persistentRoot != null) {
+            persistentRoot = canonicalize(persistentRoot, true);
+        }
+        if (budaRoot != null) {
+            budaRoot       = canonicalize(budaRoot, true);
+        }
 
         System.setProperty("dvb.persistent.root", persistentRoot);
         System.setProperty("bluray.bindingunit.root", budaRoot);



More information about the libbluray-devel mailing list