diff --git a/JGE/src/hge/hgeparticle.cpp b/JGE/src/hge/hgeparticle.cpp index ba2d74859..58f9a3754 100644 --- a/JGE/src/hge/hgeparticle.cpp +++ b/JGE/src/hge/hgeparticle.cpp @@ -141,7 +141,8 @@ void hgeParticleSystem::Update(float fDeltaTime) if(par->fAge >= par->fTerminalAge) { nParticlesAlive--; - memcpy(par, &particles[nParticlesAlive], sizeof(hgeParticle)); + if (par != &particles[nParticlesAlive]) + memcpy(par, &particles[nParticlesAlive], sizeof(hgeParticle)); i--; continue; }