Closed SomeSourceCode closed 3 months ago
When the scene root is set to null, rendering the GUI throws a NullPointerException.
null
NullPointerException
This is because ChestGui#render() method doesn't return after checking whether the root is null.
ChestGui#render()
https://github.com/SomeSourceCode/SomeGuiApi/blob/b8a1802e3f2667fba55dbdab64c4a756a1e34626/src/main/java/io/github/somesourcecode/someguiapi/scene/gui/ChestGui.java#L108-L113
In this code snippet the method doesn't return if the root is null. When fixing this, note that the method needs to return when the root is null regardless of what the background is.
Description
When the scene root is set to
null
, rendering the GUI throws aNullPointerException
.Potential Fix
This is because
ChestGui#render()
method doesn't return after checking whether the root is null.https://github.com/SomeSourceCode/SomeGuiApi/blob/b8a1802e3f2667fba55dbdab64c4a756a1e34626/src/main/java/io/github/somesourcecode/someguiapi/scene/gui/ChestGui.java#L108-L113
In this code snippet the method doesn't return if the root is
null
. When fixing this, note that the method needs to return when the root isnull
regardless of what the background is.