Commit 8d3ce1d
Only call destruction_callback if non-null (flutter#24845)
In MakeSkSurfaceFromBackingStore and other places in embedder.cc, we
call a texture or framebuffer destruction callback without first
verifying it's non-null. This adds a check before such calls.
Currently fl_renderer_gl_create_backing_store() in the Linux GTK
embedder and ExternalTextureGL::PopulateTexture() in the Windows
embedder either explicitly or implicitly set a null destruction
callback.
This prevents a crash reported when running under OpenGL ES 2.0 reported
in flutter/flutter#76881.
While this prevents the crash, it does not fix the underlying issue.1 parent c4020d8 commit 8d3ce1d
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
473 | 475 | | |
474 | 476 | | |
475 | 477 | | |
| |||
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
515 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
| |||
537 | 541 | | |
538 | 542 | | |
539 | 543 | | |
540 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
541 | 547 | | |
542 | 548 | | |
543 | 549 | | |
| |||
551 | 557 | | |
552 | 558 | | |
553 | 559 | | |
554 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
555 | 563 | | |
556 | 564 | | |
557 | 565 | | |
| |||
0 commit comments