Skip to content

Commit

Permalink
Fixed null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fulminazzo committed Apr 11, 2024
1 parent cf070f1 commit 1182159
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/base/src/main/java/it/angrybear/yagl/guis/GUIImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public boolean isMovable(int slot) {
@Override
public @NotNull List<GUIContent> getContents() {
List<GUIContent> list = new LinkedList<>();
for (Contents content : this.contents) list.addAll(Arrays.asList(content.contents));
for (Contents content : this.contents)
if (content != null)
list.addAll(Arrays.asList(content.contents));
return list;
}

Expand Down

0 comments on commit 1182159

Please sign in to comment.