mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:07:23 +01:00
potentially some fixes idk
This commit is contained in:
parent
bc8d61b19d
commit
6b35b2bf4a
5 changed files with 78 additions and 44 deletions
|
|
@ -19,4 +19,23 @@ public static class VariousExtensions
|
|||
|
||||
return ((FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)gameObject.Address)->ObjectIndex;
|
||||
}
|
||||
|
||||
public static void CancelDispose(this CancellationTokenSource? cts)
|
||||
{
|
||||
try
|
||||
{
|
||||
cts?.Cancel();
|
||||
cts?.Dispose();
|
||||
}
|
||||
catch(ObjectDisposedException)
|
||||
{
|
||||
// swallow it
|
||||
}
|
||||
}
|
||||
|
||||
public static CancellationTokenSource CancelRecreate(this CancellationTokenSource? cts)
|
||||
{
|
||||
cts.CancelDispose();
|
||||
return new CancellationTokenSource();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue