From b8b0c1ecade40e356f72156a0980cdc1ba132e85 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 15 Aug 2024 22:14:01 +0200 Subject: [PATCH] Update LibIkvm.cs Signed-off-by: Fabian --- src/IKVM.Runtime/LibIkvm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IKVM.Runtime/LibIkvm.cs b/src/IKVM.Runtime/LibIkvm.cs index 5ceb9cabb..4235c8b54 100644 --- a/src/IKVM.Runtime/LibIkvm.cs +++ b/src/IKVM.Runtime/LibIkvm.cs @@ -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