Skip to content

Drop a screen's frame before its surface - #37

Merged
O6lvl4 merged 1 commit into
mainfrom
surface-drop
Oct 1, 2026
Merged

O6lvl4 merged 1 commit into
mainfrom
surface-drop

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Closing a window whose screen still held the frame being recorded panicked in wgpu (Surface[Id(0,1)] does not exist). Struct fields drop in order, so the surface went before the SurfaceTexture taken from it. Moving frame first fixes it.

Checked with a two-window program that closes window 1 right after drawing into it: main panics, and this branch goes on drawing window 2.

@O6lvl4
O6lvl4 merged commit d3f271d into main Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant