Null check

This commit is contained in:
Magnus Ulf 2018-12-30 10:18:55 +01:00
parent 72e61af22b
commit b25471eeaf

View File

@ -18,6 +18,10 @@ public class MassiveCoreTaskDeleteFiles implements Runnable
@Override
public void run()
{
// Some people got null pointers
if (MassiveCoreMConf.get() == null) throw new NullPointerException("mconf");
if (MassiveCoreMConf.get().deleteFiles == null) throw new NullPointerException("deleteFiles");
for (String deleteFile : MassiveCoreMConf.get().deleteFiles)
{
File file = new File(deleteFile);