0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

obs-qsv11: Don't try to free non allocated array on destruction

This commit is contained in:
Colin Edwards 2019-02-28 17:56:12 -06:00
parent f2d7f5b2e7
commit d8f254550f

View File

@ -584,11 +584,13 @@ mfxStatus QSV_Encoder_Internal::ClearData()
if (m_bUseD3D11 || m_bD3D9HACK)
m_mfxAllocator.Free(m_mfxAllocator.pthis, &m_mfxResponse);
for (int i = 0; i < m_nSurfNum; i++) {
if (!m_bUseD3D11 && !m_bD3D9HACK)
delete m_pmfxSurfaces[i]->Data.Y;
if (m_pmfxSurfaces) {
for (int i = 0; i < m_nSurfNum; i++) {
if (!m_bUseD3D11 && !m_bD3D9HACK)
delete m_pmfxSurfaces[i]->Data.Y;
delete m_pmfxSurfaces[i];
delete m_pmfxSurfaces[i];
}
}
MSDK_SAFE_DELETE_ARRAY(m_pmfxSurfaces);