Commit a87a891c authored by Daniel Buckmaster's avatar Daniel Buckmaster

Prevent crash when loading Player with no shape.

parent b97c4eff
......@@ -356,6 +356,7 @@ PlayerData::PlayerData()
decalID = 0;
decalOffset = 0.0f;
actionCount = 0;
lookAction = 0;
// size of bounding box
......@@ -3691,7 +3692,7 @@ bool Player::setActionThread(const char* sequence,bool hold,bool wait,bool fsp)
void Player::setActionThread(U32 action,bool forward,bool hold,bool wait,bool fsp, bool forceSet)
{
if (!mDataBlock || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet))
if (!mDataBlock || !mDataBlock->actionCount || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet))
return;
if (action >= PlayerData::NumActionAnims)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment