Commit 49beec86 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Return DDERR_NOPALETTEATTACHED if no palette is attached.

parent ce3d8361
......@@ -1984,6 +1984,7 @@ IDirectDrawSurfaceImpl_GetPalette(IDirectDrawSurface7 *iface,
else
{
*Pal = NULL;
hr = DDERR_NOPALETTEATTACHED;
}
return hr;
......@@ -2055,7 +2056,7 @@ IDirectDrawSurfaceImpl_SetPalette(IDirectDrawSurface7 *iface,
/* Find the old palette */
hr = IDirectDrawSurface_GetPalette(iface, &oldPal);
if(hr != DD_OK) return hr;
if(hr != DD_OK && hr != DDERR_NOPALETTEATTACHED) return hr;
if(oldPal) IDirectDrawPalette_Release(oldPal); /* For the GetPalette */
/* Set the new Palette */
......
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