mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07: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:
+2
-1
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user