Henri Verbeet : ddraw: Release the wined3d mutex on error paths in ddraw_surface7_Blt().

Alexandre Julliard julliard at winehq.org
Wed Aug 14 20:17:23 CDT 2019


Module: wine
Branch: master
Commit: 669e3ac3de1256e25e490941c78e9299285133d8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=669e3ac3de1256e25e490941c78e9299285133d8

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Aug 14 16:52:37 2019 +0430

ddraw: Release the wined3d mutex on error paths in ddraw_surface7_Blt().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/surface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index d415e4a..59af556 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -1742,6 +1742,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
                 && ((ULONG)src_rect->left >= src_rect->right || src_rect->right > src_impl->surface_desc.dwWidth
                 || (ULONG)src_rect->top >= src_rect->bottom || src_rect->bottom > src_impl->surface_desc.dwHeight))
         {
+            wined3d_mutex_unlock();
             WARN("Invalid source rectangle.\n");
             return DDERR_INVALIDRECT;
         }
@@ -1779,6 +1780,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
     if (!(flags & (DDBLT_COLORFILL | DDBLT_DEPTHFILL)) && !src_impl)
     {
         WARN("No source surface.\n");
+        wined3d_mutex_unlock();
         return DDERR_INVALIDPARAMS;
     }
 




More information about the wine-cvs mailing list