From e7af6d933ff573d94d5a45e580dbb178402cc875 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 27 Jul 2024 22:35:39 +0800 Subject: [PATCH] [saco] Implement/match CNewPlayerTags destructor --- saco/newplayertags.cpp | 6 ++++++ saco/newplayertags.h | 1 + 2 files changed, 7 insertions(+) diff --git a/saco/newplayertags.cpp b/saco/newplayertags.cpp index 672599b..1165249 100644 --- a/saco/newplayertags.cpp +++ b/saco/newplayertags.cpp @@ -10,6 +10,12 @@ CNewPlayerTags::CNewPlayerTags(IDirect3DDevice9* pDevice) D3DXCreateSprite(pDevice, &m_pSprite); } +CNewPlayerTags::~CNewPlayerTags() +{ + if(m_pStates) m_pStates->Release(); + SAFE_DELETE(m_pSprite); +} + void CNewPlayerTags::RestoreDeviceObjects() { if(m_pSprite) diff --git a/saco/newplayertags.h b/saco/newplayertags.h index 2a5a5de..7959476 100644 --- a/saco/newplayertags.h +++ b/saco/newplayertags.h @@ -10,6 +10,7 @@ private: public: CNewPlayerTags(IDirect3DDevice9* pDevice); + ~CNewPlayerTags(); void RestoreDeviceObjects(); };