Skip to content

Commit

Permalink
Check that SwapChain is valid in endFrame (#8219)
Browse files Browse the repository at this point in the history
  • Loading branch information
bejado authored Oct 24, 2024
1 parent 99308c9 commit 3f150e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filament/src/details/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ void FRenderer::endFrame() {
driver.debugThreading();
}

FILAMENT_CHECK_PRECONDITION(engine.isValid(mSwapChain))
<< "SwapChain must remain valid until endFrame is called.";

if (mSwapChain) {
mSwapChain->commit(driver);
mSwapChain = nullptr;
Expand Down

0 comments on commit 3f150e0

Please sign in to comment.