[1/3] DDraw: Hold the dll lock in IDirectDrawSurfaceX methods
Alexandre Julliard
julliard at winehq.org
Wed May 23 06:03:05 CDT 2007
Stefan Dösinger <stefandoesinger at gmx.at> writes:
> @@ -810,8 +841,12 @@ IDirectDrawSurfaceImpl_AddAttachedSurface(IDirectDrawSurfaceImpl *This,
> {
> TRACE("(%p)->(%p)\n", This, Surf);
>
> + EnterCriticalSection(&ddraw_cs);
> if(Surf == This)
> + {
> + LeaveCriticalSection(&ddraw_cs);
> return DDERR_CANNOTATTACHSURFACE; /* unchecked */
> + }
Parameter checks can be done outside the section, it simplifies the
code. There are many more such cases in the patch.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list