Skip to content

Commit c2ccfd2

Browse files
authored
Fix file lock after img:destroy() (#3367)
1 parent 4a746ec commit c2ccfd2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Client/mods/deathmatch/logic/CClientIMG.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ CClientIMG::CClientIMG(class CClientManager* pManager, ElementID ID)
2828
CClientIMG::~CClientIMG()
2929
{
3030
m_pImgManager->RemoveFromList(this);
31+
Unlink();
32+
}
33+
34+
void CClientIMG::Unlink()
35+
{
3136
if (IsStreamed())
3237
StreamDisable();
3338

Client/mods/deathmatch/logic/CClientIMG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CClientIMG : public CClientEntity
5050
CClientIMG(class CClientManager* pManager, ElementID ID);
5151
~CClientIMG();
5252

53-
void Unlink(){};
53+
void Unlink();
5454
void GetPosition(CVector& vecPosition) const {};
5555
void SetPosition(const CVector& vecPosition){};
5656

0 commit comments

Comments
 (0)