diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-06-09 17:13:36 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-06-13 09:35:55 +0000 |
commit | 28077218067438fef5cdc746feb45ca6d4e755d9 (patch) | |
tree | da97f1171fbf88406fc3b854964ddbfc2131f992 | |
parent | 5b3435cd1d8715ede24906e374a306ddc6c4dc32 (diff) | |
download | qtwebkit-28077218067438fef5cdc746feb45ca6d4e755d9.tar.gz |
Do not warn about invalid images
Null or invalid images are safe since we are not decoding them.
Change-Id: I292685863a0116c25931c096ec183275c891a55d
Task-number: QTBUG-53989
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 74696c23d..c93c79b1b 100644 --- a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -93,7 +93,7 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived) // QImageReader only allows retrieving the format before reading the image m_format = m_reader->format(); - if (!isFormatWhiteListed(m_format)) { + if (!m_format.isEmpty() && !isFormatWhiteListed(m_format)) { qWarning("Image of format '%s' blocked because it is not considered safe. If you are sure it is safe to do so, you can white-list the format by setting the environment variable QTWEBKIT_IMAGEFORMAT_WHITELIST=%s", m_format.constData(), m_format.constData()); setFailed(); m_reader.clear(); |