[libbluray-devel] Check for null

hpi1 git at videolan.org
Thu Oct 30 11:41:18 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Oct 30 12:16:10 2014 +0200| [328cbdc5dd08a4e6ce6606e77a00e8bfb5915b34] | committer: hpi1

Check for null

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

 src/libbluray/bdj/java/org/videolan/CacheDir.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/CacheDir.java b/src/libbluray/bdj/java/org/videolan/CacheDir.java
index a903ed8..3cf2339 100644
--- a/src/libbluray/bdj/java/org/videolan/CacheDir.java
+++ b/src/libbluray/bdj/java/org/videolan/CacheDir.java
@@ -65,6 +65,7 @@ class CacheDir {
 
     private static void removeImpl(File dir) {
         File[] files = dir.listFiles();
+        if (files != null) {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
             if (file.isDirectory()) {
@@ -75,6 +76,7 @@ class CacheDir {
                 }
             }
         }
+        }
 
         if (!dir.delete()) {
             logger.error("Error removing " + dir.getPath());



More information about the libbluray-devel mailing list