Commit 5f0b2a7f54d53e92b8209d09c92756dc5ac9c95c

Sam Lantinga 2021-01-01T11:12:22

Fixed resource leak with D3D11 NV12 textures

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
diff --git a/build-scripts/config.guess b/build-scripts/config.guess
old mode 100755
new mode 100644
diff --git a/build-scripts/config.sub b/build-scripts/config.sub
old mode 100755
new mode 100644
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index d814abc..3ceb1a8 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -1240,6 +1240,8 @@ D3D11_DestroyTexture(SDL_Renderer * renderer,
     SAFE_RELEASE(data->mainTextureResourceViewU);
     SAFE_RELEASE(data->mainTextureV);
     SAFE_RELEASE(data->mainTextureResourceViewV);
+    SAFE_RELEASE(data->mainTextureNV);
+    SAFE_RELEASE(data->mainTextureResourceViewNV);
     SDL_free(data->pixels);
     SDL_free(data);
     texture->driverdata = NULL;