Commit 1c593052 authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Fix crash in GLES2DecoderPassthroughImpl::Destroy

Bug: 857038
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Id5564ce088b602a7284c7660b560c5529a1e820e
Reviewed-on: https://chromium-review.googlesource.com/1117440Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570984}
parent 196fad80
...@@ -911,13 +911,15 @@ void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { ...@@ -911,13 +911,15 @@ void GLES2DecoderPassthroughImpl::Destroy(bool have_context) {
} }
} }
for (PassthroughAbstractTextureImpl* iter : abstract_textures_) { if (resources_) { // Initialize may not have been called yet.
resources_->textures_pending_destruction.insert( for (PassthroughAbstractTextureImpl* iter : abstract_textures_) {
iter->OnDecoderWillDestroy()); resources_->textures_pending_destruction.insert(
} iter->OnDecoderWillDestroy());
abstract_textures_.clear(); }
if (have_context) { abstract_textures_.clear();
resources_->DestroyPendingTextures(/*has_context=*/true); if (have_context) {
resources_->DestroyPendingTextures(/*has_context=*/true);
}
} }
DeleteServiceObjects(&framebuffer_id_map_, have_context, DeleteServiceObjects(&framebuffer_id_map_, have_context,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment