Merge branch 'projectile_crash' into 'master'

Prevent nullptr access

See merge request OpenMW/openmw!565
pull/3044/head
Frederic Chardon 4 years ago
commit 2353a4d8ec

@ -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;

Loading…
Cancel
Save