From 6dade0b1140ad13ec4b39f6108df9170b3ae085d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 15 Jun 2016 14:32:25 +0200 Subject: [PATCH] PropagateUpload: fix crash in PUTFileJob::slotTimeout Same fix as in commit 60c101d9 From the crash reporter: Crash EXCEPTION_ACCESS_VIOLATION_READ at 0x4 qnetworkreply.cpp in QNetworkReply::request at line 476 propagateupload.cpp in OCC::PUTFileJob::slotTimeout at line 100 moc_abstractnetworkjob.cpp in OCC::AbstractNetworkJob::qt_static_metacall at line 98 qobject.cpp in QMetaObject::activate at line 3716 moc_qtimer.cpp in QTimer::timeout at line 192 qtimer.cpp in QTimer::timerEvent at line 247 qobject.cpp in QObject::event at line 1267 qapplication.cpp in QApplicationPrivate::notify_helper at line 3722 qapplication.cpp in QApplication::notify at line 3505 qcoreapplication.cpp in QCoreApplication::notifyInternal at line 932 --- src/libsync/propagateupload.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp index 2ef53dd6b..5875ae739 100644 --- a/src/libsync/propagateupload.cpp +++ b/src/libsync/propagateupload.cpp @@ -97,7 +97,9 @@ void PUTFileJob::start() { } void PUTFileJob::slotTimeout() { - qDebug() << "Timeout" << reply()->request().url(); + qDebug() << "Timeout" << (reply() ? reply()->request().url() : path()); + if (!reply()) + return; _errorString = tr("Connection Timeout"); reply()->abort(); }