[libbluray-devel] Check for null

hpi1 git at videolan.org
Thu Jun 15 00:03:39 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Jun 10 10:47:49 2017 +0300| [d8d5c6cabbd35404a0f10e496381c7ca4c1c4784] | committer: hpi1

Check for null

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

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

diff --git a/src/libbluray/bdj/java/org/videolan/MountManager.java b/src/libbluray/bdj/java/org/videolan/MountManager.java
index 6f6fd528..c9f57594 100644
--- a/src/libbluray/bdj/java/org/videolan/MountManager.java
+++ b/src/libbluray/bdj/java/org/videolan/MountManager.java
@@ -106,11 +106,15 @@ public class MountManager {
                     } else if (!classFiles && entry.getName().endsWith(".class")) {
                         // logger.info("skip " + entry.getName());
                     } else {
-                        /* make sure path exists */
-                        out.getParentFile().mkdirs();
 
                         logger.info("   mount: " + entry.getName());
 
+                        /* make sure path exists */
+                        File dir = out.getParentFile();
+                        if (dir != null) {
+                            dir.mkdirs();
+                        }
+
                         try {
                             inStream = jar.getInputStream(entry);
                         } catch (SecurityException se) {



More information about the libbluray-devel mailing list