diff options
Diffstat (limited to 'src/gui/painting/qwindowsurface_mac.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface_mac.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qwindowsurface_mac.cpp b/src/gui/painting/qwindowsurface_mac.cpp index 1c97ebb..9f24532 100644 --- a/src/gui/painting/qwindowsurface_mac.cpp +++ b/src/gui/painting/qwindowsurface_mac.cpp @@ -82,6 +82,7 @@ void QMacWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint extern CGContextRef qt_mac_graphicsContextFor(QWidget *); CGContextRef context = qt_mac_graphicsContextFor(widget); #endif + CGContextRetain(context); CGContextSaveGState(context); // Flip context. @@ -109,6 +110,7 @@ void QMacWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint #else CGContextFlush(context); #endif + CGContextRelease(context); } void QMacWindowSurface::setGeometry(const QRect &rect) |