Skip to content

Commit 3761df3

Browse files
authored
Hotfix NPE
1 parent ff65a02 commit 3761df3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ldtteam/blockui/controls/ItemIconWithBlockState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public BlockStateRenderingData getBlockState()
294294
*/
295295
protected void readBlockStateFromCurrentItemStack()
296296
{
297-
if (!(itemStack.getItem() instanceof final BlockItem blockItem))
297+
if (itemStack == null || !(itemStack.getItem() instanceof final BlockItem blockItem))
298298
{
299299
return;
300300
}

0 commit comments

Comments
 (0)