qget test - fix null pointer dereference
If the server sends a redirect with no body, the file is null Change-Id: I49fd1d8a4cdd404497ebef4c7f3b478960776896 Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
74d3963c25
commit
a32d6834ad
@ -122,7 +122,7 @@ void DownloadItem::finished()
|
||||
qDebug() << "too many redirects";
|
||||
} else {
|
||||
//follow redirect
|
||||
if (outputFile->isOpen()) {
|
||||
if (outputFile && outputFile->isOpen()) {
|
||||
if (!outputFile->seek(0) || !outputFile->resize(0)) {
|
||||
outputFile->close();
|
||||
outputFile->remove();
|
||||
|
Loading…
Reference in New Issue
Block a user