Skip to content

Commit

Permalink
modifyblock: quietly ignore empty list inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 11, 2019
1 parent d5e369c commit df6c695
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ public void execute(final ScriptEntry scriptEntry) {
}
final List<Float> percs = percentages;

if ((locations == null || locations.size() == 0) && (location_list == null || location_list.size() == 0)) {
if (locations == null && location_list == null) {
dB.echoError("Must specify a valid location!");
return;
}
if ((location_list != null && location_list.size() == 0) || (locations != null && locations.size() == 0)) {
return;
}
if (materialList.size() == 0) {
dB.echoError("Must specify a valid material!");
return;
Expand Down

0 comments on commit df6c695

Please sign in to comment.