Fix a recursive call when DirectDraw is created more than once
This commit is contained in:
parent
88bac67fd5
commit
17968c433c
1 changed files with 2 additions and 0 deletions
2
main.c
2
main.c
|
@ -370,6 +370,8 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
||||||
|
|
||||||
if(This->Ref == 0)
|
if(This->Ref == 0)
|
||||||
{
|
{
|
||||||
|
/* restore old wndproc, subsequent ddraw creation will otherwise fail */
|
||||||
|
SetWindowLong(This->hWnd, GWL_WNDPROC, (LONG)This->WndProc);
|
||||||
//free(This);
|
//free(This);
|
||||||
ddraw = NULL;
|
ddraw = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue