mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
fix(component): release correct model in CCharacterComponent::Init
This commit is contained in:
parent
de95191127
commit
ecc98d4738
@ -732,8 +732,9 @@ CharSectionsRec* CCharacterComponent::GetSectionsRecord(COMPONENT_VARIATIONS sec
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CCharacterComponent::Init(ComponentData* data, const char* a3) {
|
int32_t CCharacterComponent::Init(ComponentData* data, const char* a3) {
|
||||||
if (data->model) {
|
// If existing model is present, release it before copying in new data
|
||||||
data->model->Release();
|
if (this->m_data.model) {
|
||||||
|
this->m_data.model->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_data = *data;
|
this->m_data = *data;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user