[libbluray-devel] Check for null

hpi1 git at videolan.org
Sat Jun 10 13:42:13 CEST 2017


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

Check for null

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

 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