Page MenuHome

BGE: Fix BL_ArmatureObject free when exiting the game engine
AbandonedPublic

Authored by Ulysse Martin (youle) on Dec 1 2015, 11:32 AM.

Details

Summary

If you don't put this line: m_objArma->data = NULL; before BKE_libblock_free(G.main, m_objArma); , BKE_libblock_free(G.main, m_objArma); try to access m_objArma->data (if I remember correctly, it's an ID problem... ) and this causes many crashes when exiting the game engine (with .blend with armatures).

Tests files:

Diff Detail

Event Timeline

Ulysse Martin (youle) retitled this revision from to BGE: Fix BL_ArmatureObject free when exiting the game engine .Dec 1 2015, 11:32 AM
Ulysse Martin (youle) updated this object.
Ulysse Martin (youle) updated this revision to Diff 5517.

Will BKE_libblock_free() try to free m_objArma->data if m_objArma is passed into BKE_libblock_free()? If so, couldn't we just get rid of the first free?

Maybe we need to re-evaluate rBd2fac7d