diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/openvg/qwindowsurface_vgegl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 1365344..06759d4 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -139,6 +139,10 @@ QVGSharedContext::QVGSharedContext() QVGSharedContext::~QVGSharedContext() { + // Don't accidentally destroy the QEglContext if the reference + // count falls to zero while deleting the paint engine. + ++refCount; + if (context) qt_vg_make_current(context, qt_vg_shared_surface()); delete engine; |