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

Commit c1068de

Browse files
author
Chris Yang
authored
gpu_metal_surface submitframe return false when canvas is null (#18154)
1 parent 8a8cd5d commit c1068de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shell/gpu/gpu_surface_metal.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080

8181
auto submit_callback = [this](const SurfaceFrame& surface_frame, SkCanvas* canvas) -> bool {
8282
TRACE_EVENT0("flutter", "GPUSurfaceMetal::Submit");
83+
if (canvas == nullptr) {
84+
FML_DLOG(ERROR) << "Canvas not available.";
85+
return false;
86+
}
87+
8388
canvas->flush();
8489

8590
if (next_drawable_ == nullptr) {

0 commit comments

Comments
 (0)