mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Bezier-rs: Fix crash when outlining a small bézier (#1958)
Fix crash when outlining small bézier
This commit is contained in:
committed by
Keavon Chambers
parent
9524835a30
commit
bf5019db7b
@@ -164,14 +164,12 @@ async fn execute_shader<I: Pod + Send + Sync, O: Pod + Send + Sync>(device: Arc<
|
||||
// Since contents are got in bytes, this converts these bytes back to u32
|
||||
let result = bytemuck::cast_slice(&data).to_vec();
|
||||
|
||||
// With the current interface, we have to make sure all mapped views are
|
||||
// dropped before we unmap the buffer.
|
||||
// With the current interface, we have to make sure all mapped views are dropped before we unmap the buffer
|
||||
drop(data);
|
||||
staging_buffer.unmap(); // Unmaps buffer from memory
|
||||
// If you are familiar with C++ these 2 lines can be thought of similarly to:
|
||||
// delete myPointer;
|
||||
// myPointer = NULL;
|
||||
// It effectively frees the memory
|
||||
// Unmaps buffer from memory
|
||||
staging_buffer.unmap();
|
||||
// If you are familiar with C++ these 2 lines can be thought of similarly to `delete myPointer; myPointer = NULL;`.
|
||||
// It effectively frees the memory.
|
||||
|
||||
// Returns data from buffer
|
||||
Some(result)
|
||||
|
||||
Reference in New Issue
Block a user