Fix crash in appearance menu

master
Piotr Dziwinski 2015-07-10 23:57:06 +02:00
parent 9537048964
commit 0a85fae9b5
1 changed files with 3 additions and 0 deletions

View File

@ -2523,6 +2523,9 @@ int CPhysics::ObjectAdapt(const Math::Vector &pos, const Math::Vector &angle)
// iiPos = sphere center is the old position.
// iPos = sphere center has the new position.
if (m_object->GetCrashSphereCount() < 1)
return 0;
auto firstCrashSphere = m_object->GetFirstCrashSphere();
Math::Vector iiPos = firstCrashSphere.sphere.pos;
float iRad = firstCrashSphere.sphere.radius;