eina: allow graceful failure when calling eina_thread_cancel with NULL.

This commit is contained in:
Cedric Bail 2016-09-14 16:50:05 -07:00
parent de8ac30d1a
commit 4d69f472fe
1 changed files with 1 additions and 0 deletions

View File

@ -230,6 +230,7 @@ eina_thread_name_set(Eina_Thread t, const char *name)
EAPI Eina_Bool
eina_thread_cancel(Eina_Thread t)
{
if (!t) return EINA_FALSE;
return pthread_cancel((pthread_t)t) == 0;
}