fix: add flush() to skybox/IBL destroy methods to ensure that textre upload callbacks are completed to avoid stalling

This commit is contained in:
Nick Fisher
2025-07-07 17:19:36 +08:00
parent a66703b61c
commit c668549fb0

View File

@@ -394,6 +394,7 @@ class ThermionViewerFFI extends ThermionViewer {
} }
if (_skyboxTextureUploadComplete != null) { if (_skyboxTextureUploadComplete != null) {
await FilamentApp.instance!.flush();
await _skyboxTextureUploadComplete; await _skyboxTextureUploadComplete;
_skyboxTextureUploadComplete = null; _skyboxTextureUploadComplete = null;
} }
@@ -414,6 +415,7 @@ class ThermionViewerFFI extends ThermionViewer {
await ibl.destroy(); await ibl.destroy();
} }
if (_iblTextureUploadComplete != null) { if (_iblTextureUploadComplete != null) {
await FilamentApp.instance!.flush();
await _iblTextureUploadComplete!; await _iblTextureUploadComplete!;
_iblTextureUploadComplete = null; _iblTextureUploadComplete = null;
} }