Index: src/gpu/gl/GrGpuGL_program.cpp |
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp |
index bd4758c8563028ef266f8a8d0acff5dfbc84c949..9e1b6f5c2ba294aa10f75244a47de8ba1983b1d1 100644 |
--- a/src/gpu/gl/GrGpuGL_program.cpp |
+++ b/src/gpu/gl/GrGpuGL_program.cpp |
@@ -234,7 +234,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC |
SkSTArray<8, const GrEffectStage*, true> colorStages; |
SkSTArray<8, const GrEffectStage*, true> coverageStages; |
GrGLProgramDesc desc; |
- GrGLProgramDesc::Build(this->getDrawState(), |
+ if (!GrGLProgramDesc::Build(this->getDrawState(), |
type, |
blendOpts, |
srcCoeff, |
@@ -243,7 +243,10 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC |
dstCopy, |
&colorStages, |
&coverageStages, |
- &desc); |
+ &desc)) { |
+ SkDEBUGFAIL("Failed to generate GL program descriptor"); |
+ return false; |
+ } |
fCurrentProgram.reset(fProgramCache->getProgram(desc, |
colorStages.begin(), |