[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
This commit is contained in:
parent
1f633ad0a1
commit
d7d71e8a66
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user