Skip to content
Browse files

Merge pull request #1763 from PatrickvL/variable_renaming

Small code-cleanup
  • Loading branch information...
PatrickvL committed Nov 7, 2019
1 parent d50cc9c commit 9aea68534e5725e7b6e0c6f8305ba2be15ab5d07
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/hle/D3D8/Direct3D9/TextureStates.cpp
@@ -260,6 +260,10 @@ void XboxTextureStateConverter::Apply()
g_pD3DDevice->GetTexture(3, &pTexture);
g_pD3DDevice->SetTexture(0, pTexture);

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

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

0 comments on commit 9aea685

Please sign in to comment.
You can’t perform that action at this time.