egfx: client: add missing NULL checks
This commit is contained in:
parent
5690780bdd
commit
929457db4c
@ -112,7 +112,12 @@ static UINT rdpgfx_send_caps_advertise_pdu(RdpgfxClientContext* context,
|
|||||||
RDPGFX_CHANNEL_CALLBACK* callback;
|
RDPGFX_CHANNEL_CALLBACK* callback;
|
||||||
wStream* s;
|
wStream* s;
|
||||||
gfx = (RDPGFX_PLUGIN*)context->handle;
|
gfx = (RDPGFX_PLUGIN*)context->handle;
|
||||||
|
|
||||||
|
if (!gfx || !gfx->listener_callback)
|
||||||
|
return ERROR_BAD_ARGUMENTS;
|
||||||
|
|
||||||
callback = gfx->listener_callback->channel_callback;
|
callback = gfx->listener_callback->channel_callback;
|
||||||
|
|
||||||
header.flags = 0;
|
header.flags = 0;
|
||||||
header.cmdId = RDPGFX_CMDID_CAPSADVERTISE;
|
header.cmdId = RDPGFX_CMDID_CAPSADVERTISE;
|
||||||
header.pduLength = RDPGFX_HEADER_SIZE + 2;
|
header.pduLength = RDPGFX_HEADER_SIZE + 2;
|
||||||
@ -374,7 +379,7 @@ static UINT rdpgfx_send_frame_acknowledge_pdu(RdpgfxClientContext* context,
|
|||||||
|
|
||||||
gfx = (RDPGFX_PLUGIN*)context->handle;
|
gfx = (RDPGFX_PLUGIN*)context->handle;
|
||||||
|
|
||||||
if (!gfx)
|
if (!gfx || !gfx->listener_callback)
|
||||||
return ERROR_BAD_CONFIGURATION;
|
return ERROR_BAD_CONFIGURATION;
|
||||||
|
|
||||||
callback = gfx->listener_callback->channel_callback;
|
callback = gfx->listener_callback->channel_callback;
|
||||||
@ -429,7 +434,7 @@ static UINT rdpgfx_send_qoe_frame_acknowledge_pdu(RdpgfxClientContext* context,
|
|||||||
|
|
||||||
gfx = (RDPGFX_PLUGIN*)context->handle;
|
gfx = (RDPGFX_PLUGIN*)context->handle;
|
||||||
|
|
||||||
if (!gfx)
|
if (!gfx || !gfx->listener_callback)
|
||||||
return ERROR_BAD_CONFIGURATION;
|
return ERROR_BAD_CONFIGURATION;
|
||||||
|
|
||||||
callback = gfx->listener_callback->channel_callback;
|
callback = gfx->listener_callback->channel_callback;
|
||||||
@ -482,7 +487,7 @@ static UINT rdpgfx_send_cache_import_offer_pdu(RdpgfxClientContext* context,
|
|||||||
|
|
||||||
gfx = (RDPGFX_PLUGIN*)context->handle;
|
gfx = (RDPGFX_PLUGIN*)context->handle;
|
||||||
|
|
||||||
if (!gfx)
|
if (!gfx || !gfx->listener_callback)
|
||||||
return ERROR_BAD_CONFIGURATION;
|
return ERROR_BAD_CONFIGURATION;
|
||||||
|
|
||||||
callback = gfx->listener_callback->channel_callback;
|
callback = gfx->listener_callback->channel_callback;
|
||||||
|
Loading…
Reference in New Issue
Block a user