[proxy] fix possible NULL crash on shutdown
@@ -1035,6 +1035,8 @@ void pf_server_free(proxyServer* server)
pf_server_stop(server);
+ if (server->peer_list)
+ {
while (ArrayList_Count(server->peer_list) > 0)
{
/* pf_server_stop triggers the threads to shut down.
@@ -1046,6 +1048,7 @@ void pf_server_free(proxyServer* server)
*/
Sleep(100);
}
+ }
ArrayList_Free(server->peer_list);
freerdp_listener_free(server->listener);
