Fixed a crash when searching in the booklet

Closes #133
This commit is contained in:
Ellpeck 2016-06-27 18:36:59 +02:00
parent 7274eb5599
commit 1627dace83

View file

@ -233,7 +233,7 @@ public final class BookletUtils{
ItemStack[] pageStacks = page.getItemStacksForPage();
if(pageStacks != null){
for(ItemStack stack : pageStacks){
if(stack.getDisplayName().toLowerCase(Locale.ROOT).contains(text)){
if(stack != null && stack.getDisplayName().toLowerCase(Locale.ROOT).contains(text)){
return true;
}
}