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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user