summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wieldmesh.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/wieldmesh.cpp b/src/wieldmesh.cpp
index 7414701b7..7791a5a92 100644
--- a/src/wieldmesh.cpp
+++ b/src/wieldmesh.cpp
@@ -501,12 +501,8 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
const ContentFeatures &f = ndef->get(def.name);
content_t id = ndef->getId(def.name);
- if (!g_extrusion_mesh_cache) {
- g_extrusion_mesh_cache = new ExtrusionMeshCache();
- } else {
- g_extrusion_mesh_cache->grab();
- }
-
+ FATAL_ERROR_IF(!g_extrusion_mesh_cache, "Extrusion mesh cache is not yet initialized");
+
scene::SMesh *mesh = nullptr;
// Shading is on by default