During destruction of the QSV_Encoder_Internal the response may not be initialized and we can segfault. Add a check for this similar to the Windows implementation.
@@ -210,6 +210,9 @@ mfxStatus simple_gethdl(mfxHDL pthis, mfxMemId mid, mfxHDL *handle)
mfxStatus simple_free(mfxHDL pthis, mfxFrameAllocResponse *response)
{
+ if (response == nullptr)
+ return MFX_ERR_NULL_PTR;
+
if (response->mids == nullptr || response->NumFrameActual == 0)
return MFX_ERR_NONE;