diff --git a/PHI-CL/control/chest.lua b/PHI-CL/control/chest.lua index 34eb2d4..7ccee57 100644 --- a/PHI-CL/control/chest.lua +++ b/PHI-CL/control/chest.lua @@ -1,7 +1,7 @@ local main = {} function main.build(event) - if event.entity.type ~= 'logistic-container' or event.entity.prototype.logistic_mode ~= 'storage' then + if event.entity.type ~= 'logistic-container' or not event.entity.prototype or not event.entity.prototype.logistic_mode or event.entity.prototype.logistic_mode ~= 'storage' then return end