d3dxof: Don't ERR on alloc failures for small compile time known sizes.
This commit is contained in:
parent
84a8ae79d2
commit
c954d50b16
|
@ -56,10 +56,7 @@ HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj)
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl;
|
||||
object->ref = 1;
|
||||
|
@ -373,10 +370,7 @@ static HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj)
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl;
|
||||
object->ref = 1;
|
||||
|
@ -506,10 +500,7 @@ static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj)
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl;
|
||||
object->ref = 1;
|
||||
|
@ -784,10 +775,7 @@ static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImp
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl;
|
||||
object->ref = 1;
|
||||
|
@ -935,10 +923,7 @@ static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** pp
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl;
|
||||
object->ref = 1;
|
||||
|
@ -1037,7 +1022,6 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
|
|||
object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS);
|
||||
if (!object->pobj)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
hr = DXFILEERR_BADALLOC;
|
||||
goto error;
|
||||
}
|
||||
|
@ -1045,7 +1029,6 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
|
|||
object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER);
|
||||
if (!object->pstrings)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
hr = DXFILEERR_BADALLOC;
|
||||
goto error;
|
||||
}
|
||||
|
@ -1125,10 +1108,7 @@ static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** pp
|
|||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
return DXFILEERR_BADALLOC;
|
||||
}
|
||||
|
||||
object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl;
|
||||
object->ref = 1;
|
||||
|
|
Loading…
Reference in New Issue