BGE Animations: The IPO conversion code relied on objects having an adt, but this isn't always the case. object->adt can be NULL, which causes a crash. Now BL_InterpolatorLists are cached by action instead of adt.

This commit is contained in:
Mitchell Stokes
2011-08-07 04:57:23 +00:00
parent c334bf69a7
commit 5cc0bb0d1b
3 changed files with 16 additions and 16 deletions

View File

@@ -566,18 +566,18 @@ void KX_BlenderSceneConverter::RegisterPolyMaterial(RAS_IPolyMaterial *polymat)
void KX_BlenderSceneConverter::RegisterInterpolatorList(
BL_InterpolatorList *adtList,
struct AnimData *for_adt)
BL_InterpolatorList *actList,
struct bAction *for_act)
{
m_map_blender_to_gameAdtList.insert(CHashedPtr(for_adt), adtList);
m_map_blender_to_gameAdtList.insert(CHashedPtr(for_act), actList);
}
BL_InterpolatorList *KX_BlenderSceneConverter::FindInterpolatorList(
struct AnimData *for_adt)
struct bAction *for_act)
{
BL_InterpolatorList **listp = m_map_blender_to_gameAdtList[CHashedPtr(for_adt)];
BL_InterpolatorList **listp = m_map_blender_to_gameAdtList[CHashedPtr(for_act)];
return listp?*listp:NULL;
}