From 8e81d24e14961866c25c158b1428a96e23c3918f Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 25 Jun 2024 14:29:09 +0200 Subject: [PATCH] [channels,drdynvc] only set thread priority if we have one --- channels/drdynvc/client/drdynvc_main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index b05e82e12..e8331d829 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -1725,12 +1725,13 @@ static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVO WLog_Print(drdynvc->log, WLOG_ERROR, "CreateThread failed!"); goto error; } - } - if (!SetThreadPriority(drdynvc->thread, THREAD_PRIORITY_HIGHEST)) - { - error = ERROR_INTERNAL_ERROR; - WLog_Print(drdynvc->log, WLOG_ERROR, "SetThreadPriority failed!"); - goto error; + + if (!SetThreadPriority(drdynvc->thread, THREAD_PRIORITY_HIGHEST)) + { + error = ERROR_INTERNAL_ERROR; + WLog_Print(drdynvc->log, WLOG_ERROR, "SetThreadPriority failed!"); + goto error; + } } error: