From 76442c870e2f8cf3b6f88a5b530f6254de5336e0 Mon Sep 17 00:00:00 2001 From: Magic Crazy Man <350088648@qq.com> Date: Tue, 28 Jul 2026 17:46:07 +0800 Subject: [PATCH] fix: ensure mapped range is dropped before unmapping buffer in capture (#8337) After upgrading to wgpu v30, it requires to drop the `BufferView` return by `get_mapped_range` before unmap the buffer. Fix it in this pr, making screenshot event crash no more --- crates/egui-wgpu/src/capture.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/egui-wgpu/src/capture.rs b/crates/egui-wgpu/src/capture.rs index 193cb4cce..c5519e8a6 100644 --- a/crates/egui-wgpu/src/capture.rs +++ b/crates/egui-wgpu/src/capture.rs @@ -230,6 +230,7 @@ impl CaptureState { )); } } + drop(mapped_range); buffer.unmap(); tx.send((