mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-01 18:55:32 +01:00
Client: Fix crash in 'plantlike' nodes with no textures (#16792)
This commit is contained in:
@@ -130,9 +130,7 @@ static video::ITexture *extractTexture(const TileDef &def, const TileLayer &laye
|
|||||||
assert(ret->getType() == video::ETT_2D);
|
assert(ret->getType() == video::ETT_2D);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (!def.name.empty())
|
return tsrc->getTextureForMesh(def.name.empty() ? "no_texture.png" : def.name);
|
||||||
return tsrc->getTextureForMesh(def.name);
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void getAdHocNodeShader(video::SMaterial &mat, IShaderSource *shdsrc,
|
void getAdHocNodeShader(video::SMaterial &mat, IShaderSource *shdsrc,
|
||||||
@@ -711,6 +709,7 @@ void createItemMesh(Client *client, const ItemDefinition &def,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FATAL_ERROR_IF(!mesh, ("mesh creation failed for " + def.name).c_str());
|
||||||
|
|
||||||
for (u32 i = 0; i < mesh->getMeshBufferCount(); ++i) {
|
for (u32 i = 0; i < mesh->getMeshBufferCount(); ++i) {
|
||||||
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
|
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user