TQObject::activate_signal: uniformly apply if(sol) checks

It seems the situation where sol is NULL is theoretically possible. So
keep the checks and apply those uniformly to all instances of access to
`sol`.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
pull/124/head
Alexander Golubev 2 months ago
parent 5a662b671d
commit d2d0908318

@ -2794,10 +2794,10 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
TQObject *object = c->object();
TQObject *oldSender;
TQSenderObjectList* sol = object->senderObjects;
if ( sol ) {
#ifdef TQT_THREAD_SUPPORT
sol->listMutex->lock();
sol->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
if ( sol ) {
oldSender = sol->currentSender;
sol->ref();
sol->currentSender = this;
@ -2809,9 +2809,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
(currentThread && currentThread->threadPostedEventsDisabled()) ||
(currentThread && object->d->ownThread == currentThread)
) {
sol->listMutex->unlock();
if (sol) sol->listMutex->unlock();
object->tqt_emit( c->member(), o );
sol->listMutex->lock();
if (sol) sol->listMutex->lock();
}
else {
if (object->d->ownThread && !object->d->ownThread->finished()) {
@ -2832,9 +2832,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
(currentThread && currentThread->threadPostedEventsDisabled()) ||
(currentThread && object->d->ownThread == currentThread)
) {
sol->listMutex->unlock();
if (sol) sol->listMutex->unlock();
object->tqt_invoke( c->member(), o );
sol->listMutex->lock();
if (sol) sol->listMutex->lock();
}
else {
if (object->d->ownThread && !object->d->ownThread->finished()) {

Loading…
Cancel
Save