diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-02-26 15:31:23 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-27 17:50:57 +0100 |
commit | 48d39a01a78cdbb6c78133ec958123d7a8f4ae53 (patch) | |
tree | a2e571618fdc28fa0801f744ec1803d4ea8dabb3 /src/plugins/platforms/cocoa/qcocoabackingstore.mm | |
parent | e433553c1b0239f512491aa6559bc8dcd2f01f0a (diff) |
Cocoa: Remove qt_mac_toCGImage warnings
We got these because we were flushing the backing store with a
null QImage.
Change-Id: I372cb3fc7c82d3bdcfe735fcadfa72806d0ef39b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoabackingstore.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoabackingstore.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index 7f022da4c3..a2f6910688 100644 --- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm +++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm @@ -90,8 +90,10 @@ void QCocoaBackingStore::flush(QWindow *win, const QRegion ®ion, const QPoint // m_cgImage is only a reference to the data inside m_qImage, it is not a copy. CGImageRelease(m_cgImage); m_cgImage = 0; - if (QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(win->handle())) - [cocoaWindow->m_contentView flushBackingStore:this region:region offset:offset]; + if (!m_qImage.isNull()) { + if (QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(win->handle())) + [cocoaWindow->m_contentView flushBackingStore:this region:region offset:offset]; + } } void QCocoaBackingStore::resize(const QSize &size, const QRegion &) |