[EMFX][ATOM] crash during mesh reload (#1301)

* Fixed a crash when entering game mode, removing a mesh and re-adding mesh.
This commit is contained in:
Roman
2021-06-14 20:38:37 -07:00
committed by GitHub
parent 567b54ee25
commit 1f6bb14ed3
3 changed files with 8 additions and 3 deletions
@@ -456,9 +456,8 @@ namespace AZ
void AtomActorInstance::Create()
{
Destroy();
m_skinnedMeshInputBuffers = GetRenderActor()->FindOrCreateSkinnedMeshInputBuffers();
AZ_Error("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to get SkinnedMeshInputBuffers from Actor.");
AZ_Warning("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to create SkinnedMeshInputBuffers from Actor. It is likely that this actor doesn't have any meshes");
if (m_skinnedMeshInputBuffers)
{
m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod());