From: Svjatoslav Agejenko Date: Sat, 26 Oct 2019 06:00:10 +0000 (+0300) Subject: Fixed potential null pointer error X-Git-Tag: meviz-1.2~16 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=631a59ffccb6548ce1a2471982495e4094a7dd4b;hp=29fac4b9078e97c5bc8914d93140b82560fe1157;p=meviz.git Fixed potential null pointer error --- diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/indexer/FilesystemIndexRemover.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/indexer/FilesystemIndexRemover.java index 9023697..a350109 100644 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/indexer/FilesystemIndexRemover.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/indexer/FilesystemIndexRemover.java @@ -31,9 +31,11 @@ public class FilesystemIndexRemover { } // recursively remove thumbnail directories from sub directories - for (final File subFile : workingDirectory.listFiles()) - if (subFile.isDirectory()) - removeIndex(subFile); + File[] files = workingDirectory.listFiles(); + if (files != null) + for (final File subFile : files) + if (subFile.isDirectory()) + removeIndex(subFile); for (final Layout layout : Utils.getLayouts()) { final File indexFile = Utils.getLayoutIndexFile(layout,