Since we return when the factory creation fails, it can't be null here
-- v2: d3dx9: Remove superflous nullcheck (coverity).
From: Fabian Maurer dark.shadow4@web.de
Since we return when the factory creation fails, it can't be null here --- dlls/d3dx9_36/surface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 3e0b880eec4..f918d59fd19 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -1002,7 +1002,7 @@ static HRESULT d3dx_initialize_image_from_wic(const void *src_data, uint32_t src IWICBitmapFrameDecode *bitmap_frame = NULL; IWICBitmapDecoder *bitmap_decoder = NULL; uint32_t src_image_size = src_data_size; - IWICImagingFactory *wic_factory = NULL; + IWICImagingFactory *wic_factory; const void *src_image = src_data; WICPixelFormatGUID pixel_format; IWICStream *wic_stream = NULL; @@ -1102,8 +1102,7 @@ exit: IWICBitmapDecoder_Release(bitmap_decoder); if (wic_stream) IWICStream_Release(wic_stream); - if (wic_factory) - IWICImagingFactory_Release(wic_factory); + IWICImagingFactory_Release(wic_factory);
return hr; }
On Thu Jul 4 21:58:56 2024 +0000, Matteo Bruni wrote:
Patch seems correct but I have a couple of nits:
- you can now get rid of the `wic_factory` initialization at the top of
the function
- please use "d3dx9:" as the subject prefix
Thanks for the MR!
Thanks, updated.
This merge request was approved by Matteo Bruni.