summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 2d1885c..2502069 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -216,6 +216,8 @@ void QGLEngineSharedShaders::shaderDestroyed(QObject *shader)
QGLShader *QGLEngineSharedShaders::compileNamedShader(ShaderName name, QGLShader::ShaderType type)
{
Q_ASSERT(name != CustomImageSrcFragmentShader);
+ Q_ASSERT(name < InvalidShaderName);
+
if (compiledShaders[name])
return compiledShaders[name];
@@ -514,7 +516,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg()
else switch (srcPixelType) {
default:
case Qt::NoBrush:
- qCritical("QGLEngineShaderManager::useCorrectShaderProg() - I'm scared, Qt::NoBrush style is set");
+ qFatal("QGLEngineShaderManager::useCorrectShaderProg() - Qt::NoBrush style is set");
break;
case QGLEngineShaderManager::ImageSrc:
srcPixelFragShaderName = QGLEngineSharedShaders::ImageSrcFragmentShader;