mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
ParticleSpawner: Fix crash when attaching to invisible entity
This commit is contained in:
parent
495f7198ef
commit
57df895cf9
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue