mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Fix particles causing unitialised data being used due to use of incorrect union member
This commit is contained in:
parent
db3466dbe8
commit
29514918f8
@ -433,11 +433,11 @@ void ParticleManager::handleParticleEvent(ClientEvent *event, IGameDef *gamedef,
|
|||||||
|
|
||||||
{
|
{
|
||||||
JMutexAutoLock lock(m_spawner_list_lock);
|
JMutexAutoLock lock(m_spawner_list_lock);
|
||||||
if (m_particle_spawners.find(event->delete_particlespawner.id) !=
|
if (m_particle_spawners.find(event->add_particlespawner.id) !=
|
||||||
m_particle_spawners.end())
|
m_particle_spawners.end())
|
||||||
{
|
{
|
||||||
delete m_particle_spawners.find(event->delete_particlespawner.id)->second;
|
delete m_particle_spawners.find(event->add_particlespawner.id)->second;
|
||||||
m_particle_spawners.erase(event->delete_particlespawner.id);
|
m_particle_spawners.erase(event->add_particlespawner.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
video::ITexture *texture =
|
video::ITexture *texture =
|
||||||
@ -475,7 +475,7 @@ void ParticleManager::handleParticleEvent(ClientEvent *event, IGameDef *gamedef,
|
|||||||
JMutexAutoLock lock(m_spawner_list_lock);
|
JMutexAutoLock lock(m_spawner_list_lock);
|
||||||
m_particle_spawners.insert(
|
m_particle_spawners.insert(
|
||||||
std::pair<u32, ParticleSpawner*>(
|
std::pair<u32, ParticleSpawner*>(
|
||||||
event->delete_particlespawner.id,
|
event->add_particlespawner.id,
|
||||||
toadd));
|
toadd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user