[vlc-commits] [Git][videolan/vlc][3.0.x] direct3d11: fix potential crash when ID3D11DeviceContext4 is not found
Jean-Baptiste Kempf
gitlab at videolan.org
Tue Jun 15 21:33:58 UTC 2021
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
4843e8e5 by Steve Lhomme at 2021-06-15T21:09:17+00:00
direct3d11: fix potential crash when ID3D11DeviceContext4 is not found
If ID3D11DeviceContext4 is not found we should not release is when we call the
error cleanup.
(cherry picked from commit 719dd732872f1542836308ea78627164270472da)
- - - - -
1 changed file:
- modules/video_output/win32/direct3d11.c
Changes:
=====================================
modules/video_output/win32/direct3d11.c
=====================================
@@ -1644,8 +1644,11 @@ error:
ID3D11Fence_Release(sys->d3dRenderFence);
sys->d3dRenderFence = NULL;
}
- ID3D11DeviceContext4_Release(sys->d3dcontext4);
- sys->d3dcontext4 = NULL;
+ if (sys->d3dcontext4)
+ {
+ ID3D11DeviceContext4_Release(sys->d3dcontext4);
+ sys->d3dcontext4 = NULL;
+ }
CloseHandle(sys->renderFinished);
return hr;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4843e8e520c302a217bcdeacc8d28f755e7eb604
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4843e8e520c302a217bcdeacc8d28f755e7eb604
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list