1
0
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:
FunkyFr3sh 2021-05-26 19:44:01 +02:00
parent ee1278d9ea
commit ba04253dfe

View File

@ -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;