[client,X11] check PubSub for NULL

This commit is contained in:
Armin Novak 2024-04-24 16:08:11 +02:00 committed by akallabeth
parent 3049181d9b
commit d8cabe84ce

View File

@ -1991,11 +1991,14 @@ static void xfreerdp_client_free(freerdp* instance, rdpContext* context)
if (!context)
return;
PubSub_UnsubscribeTerminate(context->pubSub, xf_TerminateEventHandler);
if (context->pubSub)
{
PubSub_UnsubscribeTerminate(context->pubSub, xf_TerminateEventHandler);
#ifdef WITH_XRENDER
PubSub_UnsubscribeZoomingChange(context->pubSub, xf_ZoomingChangeEventHandler);
PubSub_UnsubscribePanningChange(context->pubSub, xf_PanningChangeEventHandler);
PubSub_UnsubscribeZoomingChange(context->pubSub, xf_ZoomingChangeEventHandler);
PubSub_UnsubscribePanningChange(context->pubSub, xf_PanningChangeEventHandler);
#endif
}
}
int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints)