mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
[channels,video] fix NULL dereference
This commit is contained in:
parent
b595a6cba8
commit
2a020b8a5f
@ -1175,8 +1175,12 @@ static UINT video_plugin_initialize(IWTSPlugin* plugin, IWTSVirtualChannelManage
|
||||
static UINT video_plugin_terminated(IWTSPlugin* pPlugin)
|
||||
{
|
||||
VIDEO_PLUGIN* video = (VIDEO_PLUGIN*)pPlugin;
|
||||
if (!video)
|
||||
return CHANNEL_RC_INVALID_INSTANCE;
|
||||
|
||||
if (video->context && video->context->priv)
|
||||
freerdp_timer_remove(video->rdpcontext, video->context->priv->timerID);
|
||||
|
||||
freerdp_timer_remove(video->rdpcontext, video->context->priv->timerID);
|
||||
if (video->control_callback)
|
||||
{
|
||||
IWTSVirtualChannelManager* mgr = video->control_callback->channel_mgr;
|
||||
|
@ -199,7 +199,9 @@ static DWORD WINAPI timer_thread(LPVOID arg)
|
||||
|
||||
const uint64_t diff = next - now;
|
||||
const uint64_t diffMS = diff / 1000;
|
||||
timeout = MIN(INFINITE, (uint32_t)diffMS);
|
||||
timeout = INFINITE;
|
||||
if (diffMS < INFINITE)
|
||||
timeout = (uint32_t)diffMS;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user