mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
add missing NULL check
This commit is contained in:
parent
c4a939eea2
commit
cff92182f9
@ -718,7 +718,7 @@ BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wM
|
|||||||
{
|
{
|
||||||
BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
||||||
|
|
||||||
if (result && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
if (result && lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
||||||
{
|
{
|
||||||
if (g_config.hook_getmessage)
|
if (g_config.hook_getmessage)
|
||||||
{
|
{
|
||||||
@ -752,7 +752,7 @@ BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT w
|
|||||||
{
|
{
|
||||||
BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
||||||
|
|
||||||
if (result && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
if (result && lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
||||||
{
|
{
|
||||||
if (g_config.hook_peekmessage)
|
if (g_config.hook_peekmessage)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user