From d7d71e8a6660331494cca42b0b1eb002c00338e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 18 Jun 2014 14:13:42 +0200 Subject: [PATCH] [declarativeimports/core] Do not crash if FadingMaterialShader failed to complie Without GLSL our shader doesn't compile and Qt aborts when accessing the uniforms. We don't want that, abort is never nice. BUG: 336272 REVIEW: 118813 --- src/declarativeimports/core/fadingnode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarativeimports/core/fadingnode.cpp b/src/declarativeimports/core/fadingnode.cpp index 0c41ec1f4..273e333f2 100644 --- a/src/declarativeimports/core/fadingnode.cpp +++ b/src/declarativeimports/core/fadingnode.cpp @@ -101,6 +101,10 @@ void FadingMaterialShader::updateState(const FadingMaterialState* newState, cons void FadingMaterialShader::initialize() { + if (!program()->isLinked()) { + // shader not linked, exit otherwise we crash, BUG: 336272 + return; + } QSGSimpleMaterialShader< FadingMaterialState >::initialize(); glFuncs = QOpenGLContext::currentContext()->functions(); program()->bind();