Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e0af244

Browse files
[engine] null check texture registry in OnPlatformViewMarkTextureFrameAvailable. (#53334)
From the issue, it looks like an NPE in this closure, we're not sure what else it could be besides the weak ptr - which could be null. Fixes flutter/flutter#149895
1 parent f5b9f70 commit e0af244

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shell/common/shell.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,9 @@ void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) {
11861186
// Tell the rasterizer that one of its textures has a new frame available.
11871187
task_runners_.GetRasterTaskRunner()->PostTask(
11881188
[rasterizer = rasterizer_->GetWeakPtr(), texture_id]() {
1189+
if (!rasterizer) {
1190+
return;
1191+
}
11891192
auto registry = rasterizer->GetTextureRegistry();
11901193

11911194
if (!registry) {

0 commit comments

Comments
 (0)