sptests/spextensions01: Avoid NULL pointer access

This commit is contained in:
Sebastian Huber
2016-07-26 09:26:19 +02:00
parent ea9384425a
commit c1b815abe0

View File

@@ -48,7 +48,8 @@ static bool life_protected(void)
executing = _Thread_Get_executing();
return (executing->Life.state & THREAD_LIFE_PROTECTED) != 0;
return executing == NULL
|| (executing->Life.state & THREAD_LIFE_PROTECTED) != 0;
}
static void assert_normal_thread_context(void)