summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-11-07 17:30:46 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:39 +0100
commitcaacccaaf0fbc0a4f4f88af7dadbfece175776d5 (patch)
tree71bc523f375ba388d1970426f7c7cfe9703e288d /src
parent6bbe89e2b858564493468c7c5bd9c978c374751a (diff)
iOS: Unset EAGL context if it's current when destroying QIOSContext
Change-Id: Ie0b27e6b0dafa2a7283b44d6676871fce15cc42a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm
index e512b3d4c8..8beb588b03 100644
--- a/src/plugins/platforms/ios/qioscontext.mm
+++ b/src/plugins/platforms/ios/qioscontext.mm
@@ -70,6 +70,9 @@ QIOSContext::QIOSContext(QOpenGLContext *context)
QIOSContext::~QIOSContext()
{
+ if ([EAGLContext currentContext] == m_eaglContext)
+ doneCurrent();
+
[m_eaglContext release];
}