Skip to content

Commit 7abfedd

Browse files
Fix a segmentation fault of wgpuBufferRelease
1 parent bcb81e1 commit 7abfedd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gpu.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,9 @@ inline void queueWorkDoneCallback(WGPUQueueWorkDoneStatus status,
15811581
// Begin the asynchronous mapping of the readback buffer.
15821582
wgpuBufferMapAsync(cbData->buffer, WGPUMapMode_Read, 0, cbData->bufferSize,
15831583
mapCallbackInfo);
1584-
wgpuBufferRelease(cbData->buffer);
1584+
1585+
// cbData->buffer needs to be freed, but calling it here will cause a segmentation fault.
1586+
// wgpuBufferRelease(cbData->buffer);
15851587
}
15861588

15871589
/**

0 commit comments

Comments
 (0)