mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02: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) {
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user