tst_qnetworkreply: condition dereferencing on non-null
The (event) loop member spends most of its time NULL, so make sure slots that dereference it can't trip up if called asynchronously when it is. Change-Id: If634df0ecf9650b52621bdb5a3e9f151abbc18fc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>bb10
parent
2f865adb16
commit
99d2e0f861
|
|
@ -1456,12 +1456,14 @@ int tst_QNetworkReply::waitForFinish(QNetworkReplyPtr &reply)
|
|||
|
||||
void tst_QNetworkReply::finished()
|
||||
{
|
||||
loop->exit(returnCode = Success);
|
||||
if (loop)
|
||||
loop->exit(returnCode = Success);
|
||||
}
|
||||
|
||||
void tst_QNetworkReply::gotError()
|
||||
{
|
||||
loop->exit(returnCode = Failure);
|
||||
if (loop)
|
||||
loop->exit(returnCode = Failure);
|
||||
disconnect(QObject::sender(), SIGNAL(finished()), this, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue