Browse Source

Fix crash in DX11 when current render target is passed into Graphics::SetTexture.

Eugene Kozlov 7 years ago
parent
commit
b78992ba43
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -1276,7 +1276,7 @@ void Graphics::SetTexture(unsigned index, Texture* texture)
             }
         }
 
-        if (texture->GetLevelsDirty())
+        if (texture && texture->GetLevelsDirty())
             texture->RegenerateLevels();
     }