windowscodecs: Fix IWICBitmapEncoder::SetPalette for a not initialized case in BMP encoder.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2017-09-13 15:12:38 -05:00 committed by Alexandre Julliard
parent c16ef729db
commit 02870de541
1 changed files with 5 additions and 3 deletions

View File

@ -465,10 +465,12 @@ static HRESULT WINAPI BmpEncoder_SetColorContexts(IWICBitmapEncoder *iface,
return E_NOTIMPL;
}
static HRESULT WINAPI BmpEncoder_SetPalette(IWICBitmapEncoder *iface, IWICPalette *pIPalette)
static HRESULT WINAPI BmpEncoder_SetPalette(IWICBitmapEncoder *iface, IWICPalette *palette)
{
TRACE("(%p,%p)\n", iface, pIPalette);
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
BmpEncoder *This = impl_from_IWICBitmapEncoder(iface);
TRACE("(%p,%p)\n", iface, palette);
return This->stream ? WINCODEC_ERR_UNSUPPORTEDOPERATION : WINCODEC_ERR_NOTINITIALIZED;
}
static HRESULT WINAPI BmpEncoder_SetThumbnail(IWICBitmapEncoder *iface, IWICBitmapSource *pIThumbnail)