gdiplus: Avoid uninitialized usage of bitmap (Coverity).

This commit is contained in:
Marcus Meissner 2012-09-03 18:56:47 +02:00 committed by Alexandre Julliard
parent fcc3a77ae5
commit 5ae8629fca
1 changed files with 12 additions and 10 deletions

View File

@ -3124,6 +3124,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, UINT active_fr
IWICBitmapSource_Release(source); IWICBitmapSource_Release(source);
} }
if (SUCCEEDED(hr)) {
bitmap->metadata_reader = NULL; bitmap->metadata_reader = NULL;
if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK) if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK)
{ {
@ -3136,6 +3137,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, UINT active_fr
palette = get_palette(frame, palette_type); palette = get_palette(frame, palette_type);
IWICBitmapFrameDecode_Release(frame); IWICBitmapFrameDecode_Release(frame);
} }
}
IWICBitmapDecoder_Release(decoder); IWICBitmapDecoder_Release(decoder);