Skip to content

Commit

Permalink
Merge pull request #91123 from aaronp64/multi_viewport_crash
Browse files Browse the repository at this point in the history
Fix `SubViewport`/`AudioStreamPlayer2D` crash
  • Loading branch information
akien-mga committed Sep 3, 2024
2 parents 49ed6c5 + 7a9acd5 commit a8337da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5048,6 +5048,9 @@ Viewport::~Viewport() {
for (ViewportTexture *E : viewport_textures) {
E->vp = nullptr;
}
if (world_2d.is_valid()) {
world_2d->remove_viewport(this);
}
ERR_FAIL_NULL(RenderingServer::get_singleton());
RenderingServer::get_singleton()->free(viewport);
}
Expand Down

0 comments on commit a8337da

Please sign in to comment.