diff --git a/src/Tesseract/Internal/InteropDotNet/LibraryLoader.cs b/src/Tesseract/Internal/InteropDotNet/LibraryLoader.cs index ccfb9091..fa14e772 100644 --- a/src/Tesseract/Internal/InteropDotNet/LibraryLoader.cs +++ b/src/Tesseract/Internal/InteropDotNet/LibraryLoader.cs @@ -84,6 +84,8 @@ private IntPtr CheckExecutingAssemblyDomain(string fileName, string platformName var baseDirectory = Path.GetDirectoryName(executingAssembly.Location); Logger.TraceInformation("Checking executing application domain location '{0}' for '{1}' on platform {2}.", baseDirectory, fileName, platformName); + if (string.IsNullOrEmpty(baseDirectory)) + return IntPtr.Zero; return InternalLoadLibrary(baseDirectory, platformName, fileName); }