direct3d11: fix crash when resource allocation fails
[vlc.git] / modules / video_output / win32 / direct3d11.c
index 009281c..72f3954 100644 (file)
@@ -1246,7 +1246,6 @@ static int Direct3D11Open(vout_display_t *vd)
 
     if (Direct3D11CreateGenericResources(vd)) {
         msg_Err(vd, "Failed to allocate resources");
-        Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }
 
@@ -1323,7 +1322,6 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt)
 
     if (Direct3D11CreateFormatResources(vd, fmt)) {
         msg_Err(vd, "Failed to allocate format resources");
-        Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }