added try/catch to processor retrieve

This commit is contained in:
itsmattkc
2019-03-17 11:23:30 +11:00
parent 535df4814c
commit eef306ff1e
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -375,7 +375,7 @@ GLuint compose_sequence(ComposeSequenceParams &params) {
#ifndef NO_OCIO
// convert to linear colorspace
if (olive::CurrentConfig.enable_color_management)
if (olive::CurrentConfig.enable_color_management && params.ocio_shader != nullptr)
{
params.ocio_shader->bind();
+9 -1
View File
@@ -215,7 +215,15 @@ void RenderThread::set_up_ocio()
// GET OCIO PROCESSOR
//
OCIO::ConstProcessorRcPtr processor = OCIO::GetCurrentConfig()->getProcessor(transform);
OCIO::ConstProcessorRcPtr processor;
try {
processor = OCIO::GetCurrentConfig()->getProcessor(transform);
} catch(OCIO::Exception & e) {
qCritical() << e.what();
ctx->functions()->glActiveTexture(GL_TEXTURE0);
return;
}
//
// SET UP GLSL SHADER