diff options
author | Gunnar Sletta <gunnar@sletta.org> | 2015-10-16 07:36:59 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2015-10-19 08:45:01 +0000 |
commit | 2e3ebcd1d4d04dece0ac0427afae4cce7c417926 (patch) | |
tree | d40a145fb90935cbd4166c0d084f6c2a44e44ed1 | |
parent | c890fa4787ef82111abdb828bb429e1fd578be41 (diff) |
Don't crash when QOpenGLPaintDevice is created without context.
Change-Id: Ic826158a1570ec49e9847cf040ce897a682048db
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index a9a4adaddc..4836dde343 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -2076,7 +2076,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev) d->device->ensureActiveTarget(); - if (d->device->context() != QOpenGLContext::currentContext()) { + if (d->device->context() != QOpenGLContext::currentContext() || !d->device->context()) { qWarning("QPainter::begin(): QOpenGLPaintDevice's context needs to be current"); return false; } |