Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/Avalonia.Controls.WebView.Core/Linux/WpeWebViewAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,13 @@ private static bool CheckAvailability()
return false;
}

if (!NativeLibrary.TryLoad("libWPEWebKit-2.0.so", out var webkitHandle))
if (!NativeLibrary.TryLoad("libWPEWebKit-2.0.so.1", out _))
return false;
if (!NativeLibrary.TryLoad("libWPEBackend-fdo-1.0.so", out var fdoHandle))
{
NativeLibrary.Free(webkitHandle);
if (!NativeLibrary.TryLoad("libWPEBackend-fdo-1.0.so.1", out _))
return false;
}
if (!NativeLibrary.TryLoad("libwpe-1.0.so", out var wpeHandle))
{
NativeLibrary.Free(fdoHandle);
NativeLibrary.Free(webkitHandle);
if (!NativeLibrary.TryLoad("libwpe-1.0.so.1", out _))
return false;
Comment on lines +104 to 109

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unloading a module is always troublesome, and it's almost never the case that these three modules don't coexist.

}

NativeLibrary.Free(wpeHandle);
NativeLibrary.Free(fdoHandle);
NativeLibrary.Free(webkitHandle);
return true;
}

Expand Down