diff options
author | Shane Kearns <ext-shane.2.kearns@nokia.com> | 2012-06-07 15:26:29 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-27 00:46:35 +0200 |
commit | a32d6834adb12571c764bd8448b1386ddc5b4fb8 (patch) | |
tree | d95c1b51dbbe9d43e6b6ae9a81ea4b65031828ea /tests | |
parent | 74d3963c25558846d7efe99260f90159c1adb49a (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/qnetworkaccessmanager/qget/transferitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/manual/qnetworkaccessmanager/qget/transferitem.cpp b/tests/manual/qnetworkaccessmanager/qget/transferitem.cpp index 1565292e6d..dcff73df2f 100644 --- a/tests/manual/qnetworkaccessmanager/qget/transferitem.cpp +++ b/tests/manual/qnetworkaccessmanager/qget/transferitem.cpp @@ -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(); |