Commit 01cba076 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ddraw: Add missing unlock on error path. Found by Smatch.

parent 884e7e7b
......@@ -369,7 +369,11 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
{
PALETTEENTRY palent[256];
if (pal == NULL) return DDERR_NOPALETTEATTACHED;
if (pal == NULL)
{
LeaveCriticalSection(&ddraw_cs);
return DDERR_NOPALETTEATTACHED;
}
IDirectDrawPalette_GetEntries(pal_src, 0, 0, 256, palent);
IDirectDrawPalette_SetEntries(pal, 0, 0, 256, palent);
}
......
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