Attempt to fix a crash

The reply might be null at the point we are timing out.
Issue #2246
This commit is contained in:
Olivier Goffart 2014-09-26 10:04:36 +02:00
parent 70912c44de
commit a3d70b3cf6

View File

@ -203,11 +203,14 @@ void AbstractNetworkJob::start()
void AbstractNetworkJob::slotTimeout()
{
qDebug() << this << "Timeout" ;
reply()->abort();
qDebug() << this << "Timeout";
if (reply()) {
reply()->abort();
} else {
qDebug() << "reply was NULL";
}
}
/*********************************************************************************************/
RequestEtagJob::RequestEtagJob(Account *account, const QString &path, QObject *parent)