aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-03-28 12:56:48 +0100
committersfan5 <sfan5@live.de>2020-03-28 12:56:48 +0100
commit04961491c197b4d1aecc1e40c6cb5e738860b31c (patch)
tree55f43347ae15fd437b18d989ae21579837d6f097
parent3c0d30964315ad9e2cba2c6ade1260d8b35293da (diff)
downloadminetest-04961491c197b4d1aecc1e40c6cb5e738860b31c.tar.gz
minetest-04961491c197b4d1aecc1e40c6cb5e738860b31c.tar.bz2
minetest-04961491c197b4d1aecc1e40c6cb5e738860b31c.zip
Fix crash on wielditem/item entities
bug was introduced in f3032a637c53f3c98fbbed1d3b691898aabe1687
-rw-r--r--src/client/content_cao.cpp3
1 files changed, 2 insertions, 1 deletions
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();