Merge pull request #341 from teajay-fr/bugfix/access_violation_on_error

Avoid accessing address 0 when reporting a failure.
This commit is contained in:
Bartosz Taudul 2022-03-10 14:52:40 +01:00 committed by GitHub
commit 469774b1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5438,7 +5438,7 @@ void Worker::ProcessZoneText()
auto td = RetrieveThread( m_threadCtx ); auto td = RetrieveThread( m_threadCtx );
if( !td ) if( !td )
{ {
ZoneTextFailure( td->id, m_pendingSingleString.ptr ); ZoneTextFailure( m_threadCtx, m_pendingSingleString.ptr );
return; return;
} }
if( td->fiber ) td = td->fiber; if( td->fiber ) td = td->fiber;
@ -5485,7 +5485,7 @@ void Worker::ProcessZoneName()
auto td = RetrieveThread( m_threadCtx ); auto td = RetrieveThread( m_threadCtx );
if( !td ) if( !td )
{ {
ZoneNameFailure( td->id ); ZoneNameFailure( m_threadCtx );
return; return;
} }
if( td->fiber ) td = td->fiber; if( td->fiber ) td = td->fiber;
@ -5507,7 +5507,7 @@ void Worker::ProcessZoneColor( const QueueZoneColor& ev )
auto td = RetrieveThread( m_threadCtx ); auto td = RetrieveThread( m_threadCtx );
if( !td ) if( !td )
{ {
ZoneColorFailure( td->id ); ZoneColorFailure( m_threadCtx );
return; return;
} }
if( td->fiber ) td = td->fiber; if( td->fiber ) td = td->fiber;
@ -5533,7 +5533,7 @@ void Worker::ProcessZoneValue( const QueueZoneValue& ev )
auto td = RetrieveThread( m_threadCtx ); auto td = RetrieveThread( m_threadCtx );
if( !td ) if( !td )
{ {
ZoneValueFailure( td->id, ev.value ); ZoneValueFailure( m_threadCtx, ev.value );
return; return;
} }
if( td->fiber ) td = td->fiber; if( td->fiber ) td = td->fiber;