Merge pull request #12383 from evedon/fix-thread_sleep_for-zero

Fix thread_sleep_for with zero wake_delay
pull/12405/head
Martin Kojtal 2020-02-10 13:18:26 +00:00 committed by GitHub
commit 67772887ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -231,7 +231,9 @@ void do_timed_sleep_relative_or_forever(uint32_t wake_delay, bool (*wake_predica
{
// Special-case 0 delay, to save multiple callers having to do it. Just call the predicate once.
if (wake_delay == 0) {
wake_predicate(wake_predicate_handle);
if (wake_predicate) {
wake_predicate(wake_predicate_handle);
}
return;
}