mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
In GetTexture, do not insert missing IDs into the texture registry map (#4339)
Fixes https://github.com/flutter/flutter/issues/12924
This commit is contained in:
parent
2920d61a5c
commit
fe6f3ab33a
@ -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) {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user