macOS: Skip uninitialized buffers in IOSurface backingstore

Task-number: QTBUG-80972
Change-Id: Ifb8eb84d6b802556ccd52ac129a91e142e265a81
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-01-03 13:22:06 +01:00
parent 7c0341daee
commit 77f1d0bfa5

View File

@ -617,8 +617,10 @@ QImage QCALayerBackingStore::toImage() const
void QCALayerBackingStore::backingPropertiesChanged()
{
qCDebug(lcQpaBackingStore) << "Updating color space of existing buffers";
for (auto &buffer : m_buffers)
buffer->setColorSpace(colorSpace());
for (auto &buffer : m_buffers) {
if (buffer)
buffer->setColorSpace(colorSpace());
}
}
QPlatformGraphicsBuffer *QCALayerBackingStore::graphicsBuffer() const