base: check cpu_session pointer during destruction

Issue #1122
This commit is contained in:
Alexander Boettcher 2014-04-29 09:45:47 +02:00 committed by Christian Helmuth
parent a9fc5304c0
commit 9fd6034e94

View File

@ -38,6 +38,9 @@ void Thread_base::_thread_start()
void Thread_base::_deinit_platform_thread()
{
if (!_cpu_session)
_cpu_session = env()->cpu_session();
_cpu_session->kill_thread(_thread_cap);
}