mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
fixes a null material runtime (#20491)
This commit is contained in:
@@ -319,6 +319,8 @@
|
||||
/datum/component/material_container/proc/get_item_material_amount(obj/item/I)
|
||||
if(!istype(I))
|
||||
return FALSE
|
||||
if(!I.materials) // some objects have no materials and this will cause runtimes without this check
|
||||
return 0
|
||||
var/material_amount = 0
|
||||
for(var/MAT in materials)
|
||||
material_amount += I.materials[MAT]
|
||||
|
||||
Reference in New Issue
Block a user