From 62823d272dd988f9417fa1bc4207c8cc9467d7d0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 16 Sep 2008 13:54:20 -0700 Subject: [PATCH] qcap: Make sure input to AMStreamConfig_SetFormat is not NULL. --- dlls/qcap/vfwcapture.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index fa4754fd60..738e1d2587 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -400,7 +400,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) ICOM_THIS_MULTI(VfwCapture, IAMStreamConfig_vtbl, iface); 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) { @@ -408,6 +408,12 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) return VFW_E_NOT_STOPPED; } + if (!pmt) + { + TRACE("pmt is NULL\n"); + return E_POINTER; + } + dump_AM_MEDIA_TYPE(pmt); pin = (IPinImpl *)This->pOutputPin; -- 2.32.0.93.g670b81a890