Skip to content

Commit

Permalink
Speculative fix for nullptr program in QueryProgramiv
Browse files Browse the repository at this point in the history
It is reported that an increase crash rate is seen on M81.
This is a speculative fix based on that most crashes have calls from
GrGLProgramBuilder::checkLinkStatus.

Bug: chromium:991020
Change-Id: I549de9e0a0cccde8b9c68d706828963fe3f9bdf2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095596
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
  • Loading branch information
shrekshao authored and Commit Bot committed Mar 10, 2020
1 parent 5d7ccc3 commit abcc536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libANGLE/queryutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ void QueryProgramiv(Context *context, const Program *program, GLenum pname, GLin
*params = program->isFlaggedForDeletion();
return;
case GL_LINK_STATUS:
*params = program->isLinked();
*params = program ? program->isLinked() : false;
return;
case GL_COMPLETION_STATUS_KHR:
if (context->isContextLost())
Expand Down

0 comments on commit abcc536

Please sign in to comment.