fix: (web) add emscripten guards for flushAndWait call when swapchain destroyed

This commit is contained in:
Nick Fisher committed 2024-10-23 14:44:29 +08:00
1 parent 10cab8dcb4
commit aa17962936
1 file changed
+4
@@ -806,7 +806,11 @@ namespace thermion_filament
_swapChain = nullptr;
Log("Swapchain destroyed.");
}
#ifdef __EMSCRIPTEN__
_engine->execute();
#else
_engine->flushAndWait();
#endif
}
void FilamentViewer::clearEntities()