diff --git a/koptilnya/mesh_loader/cl_builder.txt b/koptilnya/mesh_loader/cl_builder.txt index 34119e6..9326d0d 100644 --- a/koptilnya/mesh_loader/cl_builder.txt +++ b/koptilnya/mesh_loader/cl_builder.txt @@ -62,7 +62,11 @@ function MeshBuilder:initialize(link) if (isURL(mat.basetexture)) then mat = self:_createMaterial(mat.shader, mat.basetexture, mat.bumpmap, mat.options) else - mat = material.load(mat.basetexture) + hasErr, mat = pcall(material.load, mat.basetexture) + + if not hasErr then + mat = material.load("models/debug/debugwhite") + end end local object = {name = name, mat = mat, holo = holo}