diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-08 13:00:45 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-08 20:07:12 +0200 |
commit | 024c0b35d9dcc72d11bfcb8faadac921be92e706 (patch) | |
tree | 9a7c02541703bad8321263df28949c9021d00306 /src/quick/scenegraph | |
parent | 268833784bf10715ded1bdfa0d61fc6c67343c16 (diff) |
Protect against crashes with invalid openglContext()
1) Don't fail the assertion in the animator jobs if we don't have a context
2) Delegate the opengl context check in QQuickWindow::createTextureFromImage
to the QSGContext
Change-Id: I1b248895dcd6db406f1af8866fd0052dd7564899
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index 5bc91992e9..267c729504 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -597,6 +597,8 @@ QSGDepthStencilBufferManager *QSGRenderContext::depthStencilBufferManager() QSGTexture *QSGRenderContext::createTexture(const QImage &image) const { + if (!openglContext()) + return 0; QSGTexture *t = m_atlasManager->create(image); if (t) return t; |