Commit 36823dd9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent 1cd39515
...@@ -1783,11 +1783,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, ...@@ -1783,11 +1783,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*)); This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*));
if(!This->palettes || !This->render_targets || !This->draw_buffers) { if(!This->palettes || !This->render_targets || !This->draw_buffers) {
ERR("Out of memory!\n"); ERR("Out of memory!\n");
hr = E_OUTOFMEMORY;
goto err_out; goto err_out;
} }
This->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); This->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256);
if(!This->palettes[0]) { if(!This->palettes[0]) {
ERR("Out of memory!\n"); ERR("Out of memory!\n");
hr = E_OUTOFMEMORY;
goto err_out; goto err_out;
} }
for (i = 0; i < 256; ++i) { for (i = 0; i < 256; ++i) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment