diff options
Diffstat (limited to 'pjlib/src/pj/os_core_win32.c')
-rw-r--r-- | pjlib/src/pj/os_core_win32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 788d71f5..4a1f1bbe 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -429,7 +429,12 @@ PJ_DEF(pj_status_t) pj_thread_resume(pj_thread_t *p) PJ_DEF(pj_thread_t*) pj_thread_this(void) { pj_thread_t *rec = pj_thread_local_get(thread_tls_id); - pj_assert(rec != NULL); + + if (rec == NULL) { + pj_assert(!"Calling pjlib from unknown/external thread. You must " + "register external threads with pj_thread_register() " + "before calling any pjlib functions."); + } /* * MUST NOT check stack because this function is called |