Skip to content

Commit

Permalink
Backends: Metal: Fixed a crash on application resources. (ocornut#8367,
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Feb 3, 2025
1 parent 6265339 commit 204cebc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backends/imgui_impl_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@ void ImGui_ImplMetal_RenderDrawData(ImDrawData* drawData, id<MTLCommandBuffer> c
indexBufferOffset += (size_t)draw_list->IdxBuffer.Size * sizeof(ImDrawIdx);
}

__block MetalContext* sharedMetalContext = bd->SharedMetalContext;
MetalContext* sharedMetalContext = bd->SharedMetalContext;
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>)
{
dispatch_async(dispatch_get_main_queue(), ^{
@synchronized(bd->SharedMetalContext.bufferCache)
@synchronized(sharedMetalContext.bufferCache)
{
[sharedMetalContext.bufferCache addObject:vertexBuffer];
[sharedMetalContext.bufferCache addObject:indexBuffer];
Expand Down
6 changes: 3 additions & 3 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Breaking changes:

Other changes:

- Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(), Selectable(). (#8370)
Regression from 2025/01/13.

- Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(),
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)
Expand Down

0 comments on commit 204cebc

Please sign in to comment.