From 6de1a7b361d59ff308fe48d4dc2a0769a252a906 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Wed, 21 Dec 2022 15:00:28 +0100 Subject: [PATCH] Added check for nil items in parser filter function. --- src/itemscript.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/itemscript.lua b/src/itemscript.lua index 0927cd3..545fdb7 100644 --- a/src/itemscript.lua +++ b/src/itemscript.lua @@ -80,6 +80,7 @@ local function parseItemFilterExpression(expr) expr = "minecraft:" .. expr end return function(item) + if item == nil then return false end local matches = stackMatches(item, expr, fuzzy) if negated then matches = not matches