Nikolay Sivov : mfplat: Always initialize output arguments in GetScanline0AndPitch() for d3d9 buffers.
Alexandre Julliard
julliard at winehq.org
Thu Mar 25 16:49:22 CDT 2021
Module: wine
Branch: master
Commit: ca52f07565b52718f87881849bff136cf053c07c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ca52f07565b52718f87881849bff136cf053c07c
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Mar 25 12:40:33 2021 +0300
mfplat: Always initialize output arguments in GetScanline0AndPitch() for d3d9 buffers.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mfplat/buffer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c
index e6bf52662e8..d4efafdea45 100644
--- a/dlls/mfplat/buffer.c
+++ b/dlls/mfplat/buffer.c
@@ -689,7 +689,11 @@ static HRESULT WINAPI d3d9_surface_buffer_GetScanline0AndPitch(IMF2DBuffer2 *ifa
EnterCriticalSection(&buffer->cs);
if (!buffer->_2d.locks)
+ {
+ *scanline0 = NULL;
+ *pitch = 0;
hr = HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED);
+ }
else
{
*scanline0 = buffer->d3d9_surface.rect.pBits;
More information about the wine-cvs
mailing list