Skip to content

Commit

Permalink
Merge pull request #38 from frenzibyte/fix-nre
Browse files Browse the repository at this point in the history
Fix `_nextFrameReadyEvent` not initialised before display callback
  • Loading branch information
smoogipoo authored Mar 9, 2024
2 parents 68a9be7 + d100b39 commit a61b647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Veldrid/MTL/MTLGraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public MTLGraphicsDevice(

if (_displayLink != null)
{
_displayLink.Callback += OnDisplayLinkCallback;
_nextFrameReadyEvent = new AutoResetEvent(true);
_displayLink.Callback += OnDisplayLinkCallback;
}

_completionHandlerFuncPtr = Marshal.GetFunctionPointerForDelegate<MTLCommandBufferHandler>(_completionHandler);
Expand Down

0 comments on commit a61b647

Please sign in to comment.