This commit is contained in:
Jesse Boyd 2018-03-16 17:17:07 +11:00
parent bc5241274c
commit a5d70a65aa
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -114,8 +114,10 @@ public class HashTagPatternParser extends FaweParser<Pattern> {
}
pattern = (Pattern) dispatcher.call(command, locals, new String[0]);
}
patterns.add(pattern);
chances.add(chance);
if (pattern != null) {
patterns.add(pattern);
chances.add(chance);
}
}
} catch (CommandException | ExpressionException e) {
throw new RuntimeException(e);