1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 19:53:53 +00:00

Merge branch 'projectile_crash' into 'master'

Prevent nullptr access

See merge request OpenMW/openmw!565
This commit is contained in:
Frederic Chardon 2021-01-24 15:09:55 +00:00
commit 2353a4d8ec

View file

@ -428,6 +428,9 @@ namespace MWWorld
{ {
for (auto& projectileState : mProjectiles) for (auto& projectileState : mProjectiles)
{ {
if (projectileState.mToDelete)
continue;
auto* projectile = mPhysics->getProjectile(projectileState.mProjectileId); auto* projectile = mPhysics->getProjectile(projectileState.mProjectileId);
if (!projectile->isActive()) if (!projectile->isActive())
continue; continue;