mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[engine] null check texture registry in OnPlatformViewMarkTextureFrameAvailable. (flutter/engine#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 https://github.com/flutter/flutter/issues/149895
This commit is contained in:
parent
8d68c0be3f
commit
acf48b5a05
@ -1186,6 +1186,9 @@ void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) {
|
||||
// Tell the rasterizer that one of its textures has a new frame available.
|
||||
task_runners_.GetRasterTaskRunner()->PostTask(
|
||||
[rasterizer = rasterizer_->GetWeakPtr(), texture_id]() {
|
||||
if (!rasterizer) {
|
||||
return;
|
||||
}
|
||||
auto registry = rasterizer->GetTextureRegistry();
|
||||
|
||||
if (!registry) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user