23 May
2007
23 May
'07
11:03 a.m.
Stefan Dösinger <stefandoesinger(a)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(a)winehq.org