Return an error instead of crashing later on a divide by zero
exception when an alignment of 0 is specified.
This commit is contained in:
parent
c1fe67bc36
commit
51ae41eb0b
|
@ -178,6 +178,8 @@ static HRESULT WINAPI BaseMemAllocator_SetProperties(IMemAllocator * iface, ALLO
|
||||||
hr = VFW_E_BUFFERS_OUTSTANDING;
|
hr = VFW_E_BUFFERS_OUTSTANDING;
|
||||||
else if (This->bCommitted)
|
else if (This->bCommitted)
|
||||||
hr = VFW_E_ALREADY_COMMITTED;
|
hr = VFW_E_ALREADY_COMMITTED;
|
||||||
|
else if (pRequest->cbAlign == 0)
|
||||||
|
hr = VFW_E_BADALIGN;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!This->pProps)
|
if (!This->pProps)
|
||||||
|
|
Loading…
Reference in New Issue