diff --git a/OpenMetaverse/Helpers.cs b/OpenMetaverse/Helpers.cs index 86b2135e..f6aab6a8 100644 --- a/OpenMetaverse/Helpers.cs +++ b/OpenMetaverse/Helpers.cs @@ -458,8 +458,15 @@ namespace OpenMetaverse public static System.IO.Stream GetResourceStream(string resourceName, string searchPath) { if (searchPath != null) - { - string filename = System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), searchPath), resourceName); + { + Assembly gea = Assembly.GetEntryAssembly(); + string dirname = "."; + if (gea != null) + { + dirname = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(gea.Location), searchPath); + } + + string filename = System.IO.Path.Combine(dirname, resourceName); try { return new System.IO.FileStream(