From 5d8401e4bfc0ac71d00a4fca734dffcd566a7708 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 9 Nov 2019 20:10:21 +0000 Subject: [PATCH] avoid NPE, pending further investigation --- core/src/main/groovy/com/muwire/core/files/FileManager.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/files/FileManager.groovy b/core/src/main/groovy/com/muwire/core/files/FileManager.groovy index c63b3643..c1dfa8e1 100644 --- a/core/src/main/groovy/com/muwire/core/files/FileManager.groovy +++ b/core/src/main/groovy/com/muwire/core/files/FileManager.groovy @@ -229,7 +229,7 @@ class FileManager { return files Set rv = new HashSet<>() files.each { - if (it.getPieceSize() != 0) + if (it != null && it.getPieceSize() != 0) rv.add(it) } rv