From 0797e38b749a517b6de69edc1956761e8e594fb7 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 9 Sep 2020 15:41:06 +0200 Subject: [PATCH] Merge pull request #3794 from budde25/download-same-file-crash Fixes crash when a file is deleted then redownloaded --- app/src/main/java/us/shandian/giga/io/StoredFileHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java b/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java index ad3ceec3dfc..eba9437e1e5 100644 --- a/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java +++ b/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java @@ -315,6 +315,7 @@ public boolean equals(StoredFileHelper storage) { return false; if (this.isInvalid() || storage.isInvalid()) { + if (this.srcName == null || storage.srcName == null || this.srcType == null || storage.srcType == null) return false; return this.srcName.equalsIgnoreCase(storage.srcName) && this.srcType.equalsIgnoreCase(storage.srcType); }