Skip to content

Commit

Permalink
Fix #1617: Vehicle DFF leak fix disabled (#1623)
Browse files Browse the repository at this point in the history
* Fix 1617: Vehicle DFF leak fix disabled

* Improve code comments

Co-authored-by: saml1er <danishroar@gmail.com>
  • Loading branch information
saml1er and codenulls committed Aug 19, 2020
1 parent c174c73 commit 96387a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Client/game_sa/CRenderWareSA.cpp
Expand Up @@ -391,7 +391,8 @@ void CRenderWareSA::ReplaceModel(RpClump* pNew, unsigned short usModelID, DWORD

// CClumpModelInfo::SetClump will increment CTxdStore reference count.
// We must remove it again to avoid TXD leaks.
CTxdStore_RemoveRef(pModelInfoInterface->usTextureDictionary);
// UPDATE: This is disabled due to a crash reported in issue #1617
// CTxdStore_RemoveRef(pModelInfoInterface->usTextureDictionary);
RpClumpDestroy(pOldClump);
}
}
Expand Down
3 changes: 2 additions & 1 deletion Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Expand Up @@ -513,7 +513,8 @@ int CLuaEngineDefs::EngineReplaceModel(lua_State* luaVM)
ushort usModelID = CModelNames::ResolveModelID(strModelName);
if (usModelID != INVALID_MODEL_ID)
{
m_pDFFManager->RestoreModel(usModelID);
// This is disabled due to a crash reported in issue #1617
// m_pDFFManager->RestoreModel(usModelID);
if (pDFF->ReplaceModel(usModelID, bAlphaTransparency))
{
lua_pushboolean(luaVM, true);
Expand Down

0 comments on commit 96387a3

Please sign in to comment.