1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +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); dprintf(" Released (%p)\n", This);
if ((This->caps & DDSCAPS_PRIMARYSURFACE)) if (g_ddraw && (This->caps & DDSCAPS_PRIMARYSURFACE))
{ {
EnterCriticalSection(&g_ddraw->cs); EnterCriticalSection(&g_ddraw->cs);
g_ddraw->primary = NULL; g_ddraw->primary = NULL;