Commit 9af59fb7 authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

ddraw: Release interfaces when exiting with error.

parent 9de210a0
......@@ -360,6 +360,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if(ret_value != D3D_OK)
{
ERR("IWineD3DPalette::GetParent failed! This is unexpected\n");
if (pal) IDirectDrawPalette_Release(pal);
LeaveCriticalSection(&ddraw_cs);
return D3DERR_TEXTURE_LOAD_FAILED;
}
......@@ -371,6 +372,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if (pal == NULL)
{
IDirectDrawPalette_Release(pal_src);
LeaveCriticalSection(&ddraw_cs);
return DDERR_NOPALETTEATTACHED;
}
......
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