fix(component): release correct model in CCharacterComponent::Init

This commit is contained in:
fallenoak 2025-10-28 10:37:36 -05:00
parent de95191127
commit ecc98d4738
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -732,8 +732,9 @@ CharSectionsRec* CCharacterComponent::GetSectionsRecord(COMPONENT_VARIATIONS sec
}
int32_t CCharacterComponent::Init(ComponentData* data, const char* a3) {
if (data->model) {
data->model->Release();
// If existing model is present, release it before copying in new data
if (this->m_data.model) {
this->m_data.model->Release();
}
this->m_data = *data;