Skip to content

Commit

Permalink
chore: Adjust for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 11, 2024
1 parent a4bb5c9 commit 8c6bb1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Resizetizer/src/SkiaSharpTools.Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea
if (libraryName.Equals("libHarfBuzzSharp", StringComparison.OrdinalIgnoreCase)
|| libraryName.Equals("HarfBuzzSharp", StringComparison.OrdinalIgnoreCase))
{
if (!LinuxTryLoad("libHarfBuzzSharp.dll")
if (!LinuxTryLoad("libHarfBuzzSharp.dll", out libHandle)
&& !_tryLoad("libHarfBuzzSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle))
{
throw new InvalidOperationException($"Failed to load libHarfBuzzSharp");
Expand All @@ -206,8 +206,8 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea
if (libraryName.Equals("libSkiaSharp", StringComparison.OrdinalIgnoreCase)
|| libraryName.Equals("SkiaSharp", StringComparison.OrdinalIgnoreCase))
{
if (!LinuxTryLoad("libSkiaSharp.dll")
!_tryLoad("libSkiaSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle))
if (!LinuxTryLoad("libSkiaSharp.dll", out libHandle)
&& !_tryLoad("libSkiaSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle))
{
throw new InvalidOperationException($"Failed to load libSkiaSharp");
}
Expand All @@ -227,7 +227,7 @@ bool LinuxTryLoad(string path, out IntPtr handle)
}
}
}

handle = IntPtr.Zero;
return false;
}

Expand Down

0 comments on commit 8c6bb1b

Please sign in to comment.