1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add addiotional null check

This commit is contained in:
FunkyFr3sh 2024-05-08 07:35:47 +02:00
parent 38b553191f
commit 91cad99b6f

View File

@ -685,7 +685,7 @@ BOOL util_detect_low_res_screen()
}
else if (g_ddraw.isworms2)
{
if ((*pW2DS)->RenderWidth && (*pW2DS)->RenderWidth < g_ddraw.width && (*pW2DS)->RenderHeight < g_ddraw.height)
if (*pW2DS && (*pW2DS)->RenderWidth && (*pW2DS)->RenderWidth < g_ddraw.width && (*pW2DS)->RenderHeight < g_ddraw.height)
{
if (g_ddraw.upscale_hack_width != (*pW2DS)->RenderWidth || g_ddraw.upscale_hack_height != (*pW2DS)->RenderHeight)
{