Fixed patterns being able to crash when no inputs are provided, fixes #1537

This commit is contained in:
raoulvdberge
2017-11-26 11:23:28 +01:00
parent f6afe6fef1
commit 05a84af1c0
2 changed files with 2 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
- Removed craft-only mode for the Exporter (raoulvdberge)
- Fixed Exporter with Stack Upgrade not working correctly in Regulator Mode (raoulvdberge)
- Fixed crash with the Constructor (raoulvdberge)
- Fixed patterns being able to crash when no inputs are provided (raoulvdberge)
### 1.5.23
- Fixed duplication bug with autocrafting (raoulvdberge)

View File

@@ -140,7 +140,7 @@ public class CraftingPattern implements ICraftingPattern {
@Override
public boolean isValid() {
return inputs.stream().filter(Objects::nonNull).count() > 0 && !outputs.isEmpty();
return !inputs.isEmpty() && inputs.stream().filter(Objects::nonNull).count() > 0 && !outputs.isEmpty();
}
@Override