Fix SIGSEGV on RsThread::start

mTid could be null while pError is null too.

This happens to me always with "gxs integrity".
This commit is contained in:
Phenom 2020-04-19 11:20:33 +02:00
parent 27bbd50f1f
commit c0ce5c7088

View File

@ -194,6 +194,15 @@ bool RsThread::start(const std::string& threadName)
print_stacktrace();
return false;
}
if(!mTid)
{
RsErr() << __PRETTY_FUNCTION__ << " pthread_create could not create"
<< " new thread: " << threadName << " mTid: " << mTid
<< std::endl;
mHasStopped = true;
print_stacktrace();
return false;
}
/* Store an extra copy of thread id for debugging */
mLastTid = mTid;