Fixes #35
If there is a problem reading the blacklist file from disk, previously, null would be returned from the DDSaveHandler.readBlacklist method. This would result in a crash later on down the line when we tried to iterate the blacklist. Now we return an empty array. I'd like to be able to diagnose the issues causing the blacklist file to be corrupted, but unfortunately when this issue crops up, people only post the crash :(
This commit is contained in:
parent
5e7cb14219
commit
caca861c7b
1 changed files with 4 additions and 2 deletions
|
@ -424,12 +424,14 @@ public class DDSaveHandler
|
|||
{
|
||||
try
|
||||
{
|
||||
return reader.readFromFile(blacklistFile);
|
||||
List<Integer> list = reader.readFromFile(blacklistFile);
|
||||
if (list == null)
|
||||
return new ArrayList<Integer>(0);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
return new ArrayList<Integer>(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue