Commit 5ae8629f authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

gdiplus: Avoid uninitialized usage of bitmap (Coverity).

parent fcc3a77a
......@@ -3124,17 +3124,19 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, UINT active_fr
IWICBitmapSource_Release(source);
}
bitmap->metadata_reader = NULL;
if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK)
{
UINT block_count = 0;
if (IWICMetadataBlockReader_GetCount(block_reader, &block_count) == S_OK && block_count)
IWICMetadataBlockReader_GetReaderByIndex(block_reader, 0, &bitmap->metadata_reader);
IWICMetadataBlockReader_Release(block_reader);
}
if (SUCCEEDED(hr)) {
bitmap->metadata_reader = NULL;
if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK)
{
UINT block_count = 0;
if (IWICMetadataBlockReader_GetCount(block_reader, &block_count) == S_OK && block_count)
IWICMetadataBlockReader_GetReaderByIndex(block_reader, 0, &bitmap->metadata_reader);
IWICMetadataBlockReader_Release(block_reader);
}
palette = get_palette(frame, palette_type);
IWICBitmapFrameDecode_Release(frame);
palette = get_palette(frame, palette_type);
IWICBitmapFrameDecode_Release(frame);
}
}
IWICBitmapDecoder_Release(decoder);
......
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