ParticleSpawner: Fix crash when attaching to invisible entity
[oweals/minetest.git] / src / client / particles.cpp
index c78a3e71a12535c2d4951502c9435729448ae4fd..7acd996dcef63f35ab85e0856d11a5df210ff5c7 100644 (file)
@@ -349,7 +349,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment *env)
        const core::matrix4 *attached_absolute_pos_rot_matrix = nullptr;
        if (m_attached_id) {
                if (GenericCAO *attached = dynamic_cast<GenericCAO *>(env->getActiveObject(m_attached_id))) {
-                       attached_absolute_pos_rot_matrix = &attached->getAbsolutePosRotMatrix();
+                       attached_absolute_pos_rot_matrix = attached->getAbsolutePosRotMatrix();
                } else {
                        unloaded = true;
                }