[vlc-devel] [PATCH] direct3d11: fix multiple subpicture reusing crash
Steve Lhomme
robux4 at gmail.com
Tue Aug 11 15:32:50 CEST 2015
---
modules/video_output/msw/direct3d11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
index 3acc4b6..5e105eb 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -1677,7 +1677,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
for (subpicture_region_t *r = subpicture->p_region; r; r = r->p_next, i++) {
for (int j = 0; j < sys->d3dregion_count; j++) {
picture_t *cache = sys->d3dregions[j];
- if (((d3d_quad_t *) cache->p_sys)->pTexture) {
+ if (cache != NULL && ((d3d_quad_t *) cache->p_sys)->pTexture) {
ID3D11Texture2D_GetDesc( ((d3d_quad_t *) cache->p_sys)->pTexture, &texDesc );
if (texDesc.Format == sys->d3dregion_format &&
texDesc.Width == r->fmt.i_visible_width &&
--
2.5.0
More information about the vlc-devel
mailing list