wined3d: Set appropriate error codes in IWineD3DDeviceImpl_Init3D() on out of memory.

This commit is contained in:
Henri Verbeet 2009-12-02 10:41:20 +01:00 committed by Alexandre Julliard
parent 1cd395153d
commit 36823dd96b
1 changed files with 2 additions and 0 deletions

View File

@ -1783,11 +1783,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*));
if(!This->palettes || !This->render_targets || !This->draw_buffers) {
ERR("Out of memory!\n");
hr = E_OUTOFMEMORY;
goto err_out;
}
This->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256);
if(!This->palettes[0]) {
ERR("Out of memory!\n");
hr = E_OUTOFMEMORY;
goto err_out;
}
for (i = 0; i < 256; ++i) {