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:
parent
ee1278d9ea
commit
ba04253dfe
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user