Backends: Metal: Fixed a crash on application resources. (#8367, #7419) [@anszom]

This commit is contained in:
ocornut
2025-02-03 14:21:53 +01:00
parent 6265339995
commit 204cebc8fc
2 changed files with 5 additions and 5 deletions

View File

@@ -311,11 +311,11 @@ void ImGui_ImplMetal_RenderDrawData(ImDrawData* drawData, id<MTLCommandBuffer> c
indexBufferOffset += (size_t)draw_list->IdxBuffer.Size * sizeof(ImDrawIdx); indexBufferOffset += (size_t)draw_list->IdxBuffer.Size * sizeof(ImDrawIdx);
} }
__block MetalContext* sharedMetalContext = bd->SharedMetalContext; MetalContext* sharedMetalContext = bd->SharedMetalContext;
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>) [commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>)
{ {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
@synchronized(bd->SharedMetalContext.bufferCache) @synchronized(sharedMetalContext.bufferCache)
{ {
[sharedMetalContext.bufferCache addObject:vertexBuffer]; [sharedMetalContext.bufferCache addObject:vertexBuffer];
[sharedMetalContext.bufferCache addObject:indexBuffer]; [sharedMetalContext.bufferCache addObject:indexBuffer];

View File

@@ -43,9 +43,9 @@ Breaking changes:
Other changes: Other changes:
- Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(), Selectable(). (#8370) - Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(),
Regression from 2025/01/13. RadioButton(), Selectable(). Regression from 2025/01/13. (#8370)
- Backends: Metal: Fixed a crash on application resources. (#8367, #7419) [@anszom]
----------------------------------------------------------------------- -----------------------------------------------------------------------
VERSION 1.91.8 (Released 2025-01-31) VERSION 1.91.8 (Released 2025-01-31)