Skip to content

Commit

Permalink
Add a null check to getLastEntryFromFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 19, 2015
1 parent a1b6759 commit 9f93dec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/net/aufdemrand/denizen/Denizen.java
Expand Up @@ -1278,7 +1278,11 @@ else if (arg.indexOf('@') == 2) {

@Override
public String getLastEntryFromFlag(String flag) {
return getFlag(flag).getLast().asString();
FlagManager.Flag theflag = getFlag(flag);
if (theflag == null || theflag.getLast() == null) {
return null;
}
return theflag.getLast().asString();
}

@Override
Expand Down

0 comments on commit 9f93dec

Please sign in to comment.