base: avoid detaching not attached trace_control

This commit is contained in:
Alexander Boettcher 2015-10-19 14:04:57 +02:00 committed by Christian Helmuth
parent 6de46dfd2e
commit f9fbe34644

View File

@ -214,5 +214,6 @@ Thread_base::~Thread_base()
* from here and any following RPC call will stumple upon the
* detached trace control dataspace.
*/
env()->rm_session()->detach(_trace_control);
if (_trace_control)
env()->rm_session()->detach(_trace_control);
}