graphicsdriver/metal/mtl: Bug fix: Fix the guard range

This commit is contained in:
Hajime Hoshi 2020-11-08 04:44:31 +09:00
parent aaff18ecf7
commit e09f3aa286

View File

@ -587,9 +587,8 @@ func (cb CommandBuffer) AddCompletedHandler(f func()) {
//export commandBufferCompletedCallback
func commandBufferCompletedCallback(commandBuffer unsafe.Pointer) {
f := commandBufferCompletedHandlers[commandBuffer]
commandBufferCompletedHandlersM.Lock()
f := commandBufferCompletedHandlers[commandBuffer]
delete(commandBufferCompletedHandlers, commandBuffer)
commandBufferCompletedHandlersM.Unlock()