diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 74cfa60b27..4351f6e2c8 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -396,10 +396,18 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, mLightHash = 0xFFFFFFFF; llassert_always(!mShaderFiles.empty()); - BOOL success = TRUE; // Create program mProgramObject = glCreateProgramObjectARB(); + if (mProgramObject == 0) + { + // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist. + LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL; + unloadInternal(); + return FALSE; + } + + BOOL success = TRUE; #if LL_DARWIN // work-around missing mix(vec3,vec3,bvec3) |