Merge pull request #1866 from PhenomRetroShare/Fix_SIGSEGV_OnRsThreadStart

Fix SIGSEGV on RsThread::start
This commit is contained in:
csoler 2020-04-21 13:11:35 +02:00 committed by GitHub
commit 1cfbfdaf63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;