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:
Robert Shearman 2005-04-11 18:50:58 +00:00 committed by Alexandre Julliard
parent c1fe67bc36
commit 51ae41eb0b
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ static HRESULT WINAPI BaseMemAllocator_SetProperties(IMemAllocator * iface, ALLO
hr = VFW_E_BUFFERS_OUTSTANDING;
else if (This->bCommitted)
hr = VFW_E_ALREADY_COMMITTED;
else if (pRequest->cbAlign == 0)
hr = VFW_E_BADALIGN;
else
{
if (!This->pProps)