diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-29 10:30:28 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-30 13:13:06 +0200 |
commit | d9b92b0fc9209733d332ac6ae145833e6b1153f2 (patch) | |
tree | b48b484b08c5a6b360d1dc0e7334db5e450480d1 | |
parent | 7ba5a86c6e84b6ecb1ba809050c74d8b0afcb20f (diff) |
Fix seeking on null QIODevice in pathological corner case
Pick-to: 6.2
Change-Id: I5b242bc27f27a844d9d2fe0725e2a1f48e50b25b
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
-rw-r--r-- | src/core/net/url_request_custom_job_proxy.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/net/url_request_custom_job_proxy.cpp b/src/core/net/url_request_custom_job_proxy.cpp index f734db645..b57583341 100644 --- a/src/core/net/url_request_custom_job_proxy.cpp +++ b/src/core/net/url_request_custom_job_proxy.cpp @@ -96,7 +96,7 @@ void URLRequestCustomJobProxy::reply(std::string mimeType, QIODevice *device) if (m_client->m_device && !m_client->m_device->isReadable()) m_client->m_device->open(QIODevice::ReadOnly); - if (m_client->m_firstBytePosition > 0) + if (m_client->m_device && m_client->m_firstBytePosition > 0) m_client->m_device->seek(m_client->m_firstBytePosition); qint64 deviceSize = m_client->m_device ? m_client->m_device->size() : -1; |