diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-02-03 12:57:05 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-02-05 12:17:07 +0000 |
commit | 9783991b615484d2926e9648b10ea090af81d93f (patch) | |
tree | de486df4c48627c34a519a075798567a6fcf8e7b /src | |
parent | 1e1ad53904ed40a13949a724a668f04ebca814a9 (diff) |
Fix crash when Canvas has negative width or height
m_fbo is null when using a threaded render loop.
Change-Id: I297ba651f9605f1718dbe9d09bd30e9682fb8401
Task-number: QTBUG-50085
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dtexture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 73b0b55a29..5ac971dc7d 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -599,6 +599,11 @@ QPaintDevice* QQuickContext2DFBOTexture::beginPainting() void QQuickContext2DFBOTexture::endPainting() { QQuickContext2DTexture::endPainting(); + + // There may not be an FBO due to zero width or height. + if (!m_fbo) + return; + if (m_multisampledFbo) QOpenGLFramebufferObject::blitFramebuffer(m_fbo, m_multisampledFbo); |