Commit 62823d27 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

qcap: Make sure input to AMStreamConfig_SetFormat is not NULL.

parent 24e42651
...@@ -400,7 +400,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) ...@@ -400,7 +400,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
ICOM_THIS_MULTI(VfwCapture, IAMStreamConfig_vtbl, iface); ICOM_THIS_MULTI(VfwCapture, IAMStreamConfig_vtbl, iface);
IPinImpl *pin; IPinImpl *pin;
TRACE("(%p): %p->%p\n", iface, pmt, pmt->pbFormat); TRACE("(%p): %p->%p\n", iface, pmt, pmt ? pmt->pbFormat : NULL);
if (This->state != State_Stopped) if (This->state != State_Stopped)
{ {
...@@ -408,6 +408,12 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) ...@@ -408,6 +408,12 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
return VFW_E_NOT_STOPPED; return VFW_E_NOT_STOPPED;
} }
if (!pmt)
{
TRACE("pmt is NULL\n");
return E_POINTER;
}
dump_AM_MEDIA_TYPE(pmt); dump_AM_MEDIA_TYPE(pmt);
pin = (IPinImpl *)This->pOutputPin; pin = (IPinImpl *)This->pOutputPin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment