fix for render crash

This commit is contained in:
FunkyFr3sh 2017-11-12 16:10:15 +01:00
parent fbdfe63231
commit 772c0374eb
3 changed files with 8 additions and 8 deletions

View file

@ -44,6 +44,13 @@ ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This)
if(This->Ref == 0)
{
if (ddraw->render.thread)
{
HANDLE thread = ddraw->render.thread;
ddraw->render.thread = NULL;
WaitForSingleObject(thread, INFINITE);
}
if(This->caps == DDSCAPS_PRIMARYSURFACE)
{
EnterCriticalSection(&ddraw->cs);