From: sfan5 Date: Sat, 28 Mar 2020 11:56:48 +0000 (+0100) Subject: Fix crash on wielditem/item entities X-Git-Tag: 5.2.0~60 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=04961491c197b4d1aecc1e40c6cb5e738860b31c;p=oweals%2Fminetest.git Fix crash on wielditem/item entities bug was introduced in f3032a637c53f3c98fbbed1d3b691898aabe1687 --- diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index 30b1b8212..d148df522 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -829,7 +829,8 @@ void GenericCAO::setNodeLight(u8 light) if (m_prop.visual == "wielditem" || m_prop.visual == "item") { // Since these types of visuals are using their own shader // they should be handled separately - m_wield_meshnode->setColor(color); + if (m_wield_meshnode) + m_wield_meshnode->setColor(color); } else if (m_enable_shaders) { scene::ISceneNode *node = getSceneNode();