Skip to content

Commit

Permalink
Merge pull request #1763 from PatrickvL/variable_renaming
Browse files Browse the repository at this point in the history
Small code-cleanup
  • Loading branch information
PatrickvL committed Nov 7, 2019
1 parent d50cc9c commit 9aea685
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/hle/D3D8/Direct3D9/TextureStates.cpp
Expand Up @@ -260,6 +260,10 @@ void XboxTextureStateConverter::Apply()
g_pD3DDevice->GetTexture(3, &pTexture); g_pD3DDevice->GetTexture(3, &pTexture);
g_pD3DDevice->SetTexture(0, pTexture); g_pD3DDevice->SetTexture(0, pTexture);


// Avoid a dangling reference that would lead to a memory leak
if (pTexture != nullptr)
pTexture->Release();

// disable all other stages // disable all other stages
g_pD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); g_pD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
g_pD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE); g_pD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
Expand Down

0 comments on commit 9aea685

Please sign in to comment.