From f95bba0fe3bdac972a67d6e43f713d4c9fec8918 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Fri, 27 Sep 2024 07:26:20 +0300 Subject: [PATCH 1/2] Fix CResourceModelStreamer::FullyReleaseModel crash (#3746) * Fix crash * Revert "Fix crash" This reverts commit 7c65f864059b00f2ab8551f7ccd3ac0ac3759971. * Fix crash * Fix typo --- Client/mods/deathmatch/logic/CClientModel.cpp | 3 --- Client/mods/deathmatch/logic/CClientModelManager.cpp | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/mods/deathmatch/logic/CClientModel.cpp b/Client/mods/deathmatch/logic/CClientModel.cpp index 2a9eeb0c8d..795bc08579 100644 --- a/Client/mods/deathmatch/logic/CClientModel.cpp +++ b/Client/mods/deathmatch/logic/CClientModel.cpp @@ -84,9 +84,6 @@ bool CClientModel::Deallocate() if (!m_bAllocatedByUs) return false; - if (m_pParentResource) - m_pParentResource->GetResourceModelStreamer()->FullyReleaseModel(m_iModelID); - SetParentResource(nullptr); CModelInfo* pModelInfo = g_pGame->GetModelInfo(m_iModelID, true); diff --git a/Client/mods/deathmatch/logic/CClientModelManager.cpp b/Client/mods/deathmatch/logic/CClientModelManager.cpp index 21d795e964..36c601b544 100644 --- a/Client/mods/deathmatch/logic/CClientModelManager.cpp +++ b/Client/mods/deathmatch/logic/CClientModelManager.cpp @@ -49,6 +49,9 @@ bool CClientModelManager::Remove(const std::shared_ptr& pModel) int modelId = pModel->GetModelID(); if (m_Models[modelId] != nullptr) { + CResource* parentResource = m_Models[modelId]->GetParentResource(); + if (parentResource) + parentResource->GetResourceModelStreamer()->FullyReleaseModel(modelId); m_Models[modelId]->RestoreEntitiesUsingThisModel(); m_Models[modelId] = nullptr; m_modelCount--; From 20a161dcd087a25957c7ac48c1a6966a0e1d39ef Mon Sep 17 00:00:00 2001 From: Pot Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 04:28:09 +0000 Subject: [PATCH 2/2] Update client en_US pot [ci skip] --- Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index b323248ef6..b19c565c3c 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-25 18:23+0000\n" +"POT-Creation-Date: 2024-09-27 04:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2340,7 +2340,7 @@ msgstr "" #: Client/core/CVersionUpdater.cpp:1915 msgid "" -"Update not currently avalable.\n" +"An update is currently not available.\n" "\n" "Please check www.mtasa.com" msgstr ""