Skip to content

Commit

Permalink
Adds guard to prevent NPE for itemSortMode
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybyrrd committed Jul 9, 2024
1 parent 5a1a74c commit 6d4acf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion .idea/saveactions_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,13 @@ void onConfigChanged(ConfigChanged configChanged) {
});
break;
case "itemSortMode":
setItemSortMode(ItemSortMode.valueOf(configChanged.getNewValue()));
ItemSortMode newValue;
if (configChanged.getNewValue() == null) {
newValue = ItemSortMode.UNSORTED;
} else {
newValue = ItemSortMode.valueOf(configChanged.getNewValue());
}
setItemSortMode(newValue);
break;
case "deathpilesUseAccountPlayTime":
case "deathbankInfoBox":
Expand Down

0 comments on commit 6d4acf0

Please sign in to comment.