mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
add NULL check
This commit is contained in:
parent
ee1278d9ea
commit
ba04253dfe
@ -64,7 +64,7 @@ ULONG __stdcall IDirectDrawSurface__Release(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
dprintf(" Released (%p)\n", This);
|
||||
|
||||
if ((This->caps & DDSCAPS_PRIMARYSURFACE))
|
||||
if (g_ddraw && (This->caps & DDSCAPS_PRIMARYSURFACE))
|
||||
{
|
||||
EnterCriticalSection(&g_ddraw->cs);
|
||||
g_ddraw->primary = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user