Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2475793002: Fix crash when drawing without a program (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index c032dff22ae14ad9a95fdad3815abc464779af5b..c480b71567dca3814c19aeca0b4f7185bc338e42 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8703,7 +8703,8 @@ bool GLES2DecoderImpl::ValidateAndAdjustDrawBuffers(const char* func_name) {
bool GLES2DecoderImpl::ValidateUniformBlockBackings(const char* func_name) {
DCHECK(feature_info_->IsWebGL2OrES3Context());
- DCHECK(state_.current_program.get());
+ if (!state_.current_program.get())
+ return true;
int32_t max_index = -1;
for (auto info : state_.current_program->uniform_block_size_info()) {
int32_t index = static_cast<int32_t>(info.binding);
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698