summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-01-03 13:22:06 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-01-03 14:48:14 +0100
commit77f1d0bfa542e166deaa196b3b3b854d33a3a1b7 (patch)
treef5c2716e15254fefca42400c92d676b9518ad86b
parent7c0341daeef9c975b0e736b9d8a52b9649c6a06c (diff)
macOS: Skip uninitialized buffers in IOSurface backingstore
Task-number: QTBUG-80972 Change-Id: Ifb8eb84d6b802556ccd52ac129a91e142e265a81 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index 8a815a7665..2e15d11564 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -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