From 9ab8d0a8e6cd9db8e1d67729f851e11050997962 Mon Sep 17 00:00:00 2001
From: scrawl <scrawl@baseoftrash.de>
Date: Mon, 6 Oct 2014 14:56:07 +0200
Subject: [PATCH] Hotfix for crash when deleting an actor

---
 apps/openmw/mwworld/physicssystem.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp
index ec6f04be1..ad0f5bea5 100644
--- a/apps/openmw/mwworld/physicssystem.cpp
+++ b/apps/openmw/mwworld/physicssystem.cpp
@@ -859,6 +859,8 @@ namespace MWWorld
                     waterCollision = true;
 
                 OEngine::Physic::PhysicActor *physicActor = mEngine->getCharacter(iter->first.getRefData().getHandle());
+                if (!physicActor) // actor was already removed from the scene
+                    continue;
                 physicActor->setCanWaterWalk(waterCollision);
 
                 // 100 points of slowfall reduce gravity by 90% (this is just a guess)