mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager
This commit is contained in:
commit
033a57d19d
51 changed files with 3594 additions and 1284 deletions
|
|
@ -138,13 +138,18 @@ internal abstract class FontHandle : IFontHandle
|
|||
/// An instance of <see cref="ILockedImFont"/> that <b>must</b> be disposed after use on success;
|
||||
/// <c>null</c> with <paramref name="errorMessage"/> populated on failure.
|
||||
/// </returns>
|
||||
/// <exception cref="ObjectDisposedException">Still may be thrown.</exception>
|
||||
public ILockedImFont? TryLock(out string? errorMessage)
|
||||
{
|
||||
IFontHandleSubstance? prevSubstance = default;
|
||||
while (true)
|
||||
{
|
||||
var substance = this.Manager.Substance;
|
||||
if (this.manager is not { } nonDisposedManager)
|
||||
{
|
||||
errorMessage = "The font handle has been disposed.";
|
||||
return null;
|
||||
}
|
||||
|
||||
var substance = nonDisposedManager.Substance;
|
||||
|
||||
// Does the associated IFontAtlas have a built substance?
|
||||
if (substance is null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue