From 9e90640281cbf1767979557bab87bdd9965fb6aa Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 23 Aug 2002 08:30:44 +0000 Subject: [PATCH] fix texture memleak --- stepmania/src/RageDisplay.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index a6fcb4a64c..01eda64c01 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -690,6 +690,9 @@ void RageDisplay::SetTexture( RageTexture* pTexture ) if( pOldD3DTexture != pNewD3DTexture ) FlushQueue(); + if(pOldD3DTexture) + pOldD3DTexture->Release(); + m_pd3dDevice->SetTexture( 0, pNewD3DTexture ); } void RageDisplay::SetColorTextureMultDiffuse()