Skip to content

Commit

Permalink
Catch potential filter tag nulls
Browse files Browse the repository at this point in the history
Now nothing can be null! he said hopefully
  • Loading branch information
mcmonkey4eva committed Jan 1, 2015
1 parent d0aa615 commit a06e805
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/dList.java
Expand Up @@ -1071,8 +1071,12 @@ else if (res > 0)
dList newlist = new dList();
try {
for (String str: this) {
if (ObjectFetcher.pickObjectFor(str).getAttribute(new Attribute(attribute.getContext(1),
attribute.getScriptEntry())).equalsIgnoreCase("true")) {
if (str == null) {
dB.echoError("Null string in dList! (From .filter tag)");
}
String result = ObjectFetcher.pickObjectFor(str).getAttribute(new Attribute(attribute.getContext(1),
attribute.getScriptEntry()));
if (result != null && result.equalsIgnoreCase("true")) {
newlist.add(str);
}
}
Expand Down

0 comments on commit a06e805

Please sign in to comment.