Skip to content

Commit

Permalink
Update LibIkvm.cs
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian <Fabian-Schmidt@users.noreply.github.com>
  • Loading branch information
Fabian-Schmidt committed Aug 16, 2024
1 parent 0184887 commit b8b0c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IKVM.Runtime/LibIkvm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static nint Load()
return h1;

// start looking at assembly path, or path given by environmental variable
var asml = typeof(NativeLibrary).Assembly.Location is string s ? Path.GetDirectoryName(s) : null;
var asml = typeof(NativeLibrary).Assembly.Location is string s && !string.IsNullOrEmpty(s) ? Path.GetDirectoryName(s) : null;
var root = Environment.GetEnvironmentVariable("IKVM_LIBRARY_PATH") ?? asml ?? AppContext.BaseDirectory;

// assembly possible loaded in memory: we have no available search path
Expand Down

0 comments on commit b8b0c1e

Please sign in to comment.