未验证 提交 fe6f3ab3 编写于 作者: J Jason Simmons 提交者: GitHub

In GetTexture, do not insert missing IDs into the texture registry map (#4339)

Fixes https://github.com/flutter/flutter/issues/12924
上级 2920d61a
......@@ -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) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册