#include <winpr/string.h>
#include <winpr/stream.h>
#include <winpr/wtsapi.h>
+#include <winpr/debug.h>
#include <freerdp/freerdp.h>
#include <freerdp/error.h>
freerdp* freerdp_channel_get_instance(void)
{
if (!s_TLSContext)
+ {
+ WLog_ERR(TAG,
+ "Funcion was called from thread that did not call freerdp_channel_init_thread_context");
+ winpr_log_backtrace(TAG, WLOG_ERROR, 20);
return NULL;
+ }
return s_TLSContext->instance;
}
rdpChannels* freerdp_channel_get_channels_context(void)
{
if (!s_TLSContext)
+ {
+ WLog_ERR(TAG,
+ "Funcion was called from thread that did not call freerdp_channel_init_thread_context");
+ winpr_log_backtrace(TAG, WLOG_ERROR, 20);
return NULL;
+ }
return s_TLSContext->channels;
}