mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix segfault caused by shadow map on exit
This commit is contained in:
parent
47c146120a
commit
b3b075ea02
1 changed files with 3 additions and 3 deletions
|
@ -229,9 +229,9 @@ WieldMeshSceneNode::~WieldMeshSceneNode()
|
||||||
{
|
{
|
||||||
sanity_check(g_extrusion_mesh_cache);
|
sanity_check(g_extrusion_mesh_cache);
|
||||||
|
|
||||||
// Remove node from shadow casters
|
// Remove node from shadow casters. m_shadow might be an invalid pointer!
|
||||||
if (m_shadow)
|
if (auto shadow = RenderingEngine::get_shadow_renderer())
|
||||||
m_shadow->removeNodeFromShadowList(m_meshnode);
|
shadow->removeNodeFromShadowList(m_meshnode);
|
||||||
|
|
||||||
if (g_extrusion_mesh_cache->drop())
|
if (g_extrusion_mesh_cache->drop())
|
||||||
g_extrusion_mesh_cache = nullptr;
|
g_extrusion_mesh_cache = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue