Skip to content

Commit

Permalink
In GetTexture, do not insert missing IDs into the texture registry map (
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Nov 9, 2017
1 parent 2920d61 commit fe6f3ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/texture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ void TextureRegistry::OnGrContextDestroyed() {

std::shared_ptr<Texture> TextureRegistry::GetTexture(int64_t id) {
ASSERT_IS_GPU_THREAD
return mapping_[id];
auto it = mapping_.find(id);
return it != mapping_.end() ? it->second : nullptr;
}

Texture::Texture(int64_t id) : id_(id) {}
Expand Down

0 comments on commit fe6f3ab

Please sign in to comment.