Prevent reading QNetworkReply in error case when not bytes available

This commit is contained in:
Martchus 2018-12-24 17:35:10 +01:00
parent 1d5b90a693
commit ad42c24c96
1 changed files with 1 additions and 1 deletions

View File

@ -816,7 +816,7 @@ void SyncthingConnection::emitError(const QString &message, const QJsonParseErro
*/
void SyncthingConnection::emitError(const QString &message, SyncthingErrorCategory category, QNetworkReply *reply)
{
emit error(message + reply->errorString(), category, reply->error(), reply->request(), reply->readAll());
emit error(message + reply->errorString(), category, reply->error(), reply->request(), reply->bytesAvailable() ? reply->readAll() : QByteArray());
}
/*!