diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index 8f5cff8c9..756c7477b 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -156,11 +156,15 @@ static BOOL pf_server_post_connect(freerdp_peer* client) pServerContext* ps; rdpContext* pc; proxyData* pdata; - ps = (pServerContext*)client->context; pdata = ps->pdata; pc = p_client_context_create(client->settings); + if (pc == NULL) + { + WLog_ERR(TAG, "pf_server_post_connect(): p_client_context_create failed!"); + return FALSE; + } /* keep both sides of the connection in pdata */ ((pClientContext*)pc)->pdata = ps->pdata;