Rebase against 611c15953e8297ac1762abfb5aeca6665985fc0f.

This commit is contained in:
Sebastian Lackner
2017-08-01 05:55:02 +02:00
parent ea9d4a0fa1
commit 71f0cf0aef
4 changed files with 37 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
From 6a2b1a19e6f4b6eec02097d3ba55958ec58a7146 Mon Sep 17 00:00:00 2001
From 4d72031dc8739e38d0b7f316cd2e6908ff6ad369 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 16 Oct 2016 17:36:32 +0800
Subject: windowscodecs: Avoid crashing if no IPropertyBag2 was passed to
@@ -9,20 +9,20 @@ Subject: windowscodecs: Avoid crashing if no IPropertyBag2 was passed to
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c
index 7d8beab..45bb88f 100644
index 53fa44f8094..a787a2c4c24 100644
--- a/dlls/windowscodecs/jpegformat.c
+++ b/dlls/windowscodecs/jpegformat.c
@@ -1451,11 +1451,14 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
return WINCODEC_ERR_NOTINITIALIZED;
}
@@ -1478,11 +1478,14 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
opts[5].vt = VT_BOOL;
opts[5].dwType = PROPBAG2_TYPE_DATA;
- hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
- hr = CreatePropertyBag2(opts, 6, ppIEncoderOptions);
- if (FAILED(hr))
+ if (ppIEncoderOptions)
{
- LeaveCriticalSection(&This->lock);
- return hr;
+ hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
+ hr = CreatePropertyBag2(opts, 6, ppIEncoderOptions);
+ if (FAILED(hr))
+ {
+ LeaveCriticalSection(&This->lock);
@@ -32,5 +32,5 @@ index 7d8beab..45bb88f 100644
This->frame_count = 1;
--
2.9.0
2.13.1