diff --git a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 65d0d22de3e..97249598066 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -1809,8 +1809,9 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig if ( !resultLoadingSuccess ) { - // Error logging - CAF_ASSERT( false ); + // A result present in the meta data can still fail to load from file. This is a run-time condition, not a + // programming error, so report it instead of asserting. + RiaLogging::error( QString( "Failed to load result '%1' for time step %2" ).arg( resultName ).arg( timeStepIndex ).toStdString() ); } } diff --git a/Fwk/VizFwk/LibRender/cvfRenderStateTextureBindings.cpp b/Fwk/VizFwk/LibRender/cvfRenderStateTextureBindings.cpp index 3ae40fbac40..e114c4c2e7a 100644 --- a/Fwk/VizFwk/LibRender/cvfRenderStateTextureBindings.cpp +++ b/Fwk/VizFwk/LibRender/cvfRenderStateTextureBindings.cpp @@ -237,6 +237,14 @@ void RenderStateTextureBindings::applyOpenGL(OpenGLContext* oglContext) const const Sampler* sampler = m_bindings[i].sampler.p(); CVF_ASSERT(texture && sampler); + // Texture setup in setupTextures() can fail at run-time, leaving the texture without a valid OpenGL id. + // Skip the binding in that case, as Texture::bind() asserts on an invalid id. + if (texture->textureOglId() == 0) + { + CVF_LOG_RENDER_ERROR(oglContext, "Skipping texture binding, texture has not been set up."); + continue; + } + cvfGL->glActiveTexture(static_cast(GL_TEXTURE0 + i)); texture->bind(oglContext);