Merge pull request #27 from i7nfinity/feature/AMQNET-745
AMQNET-745 fixed NRE for single file assembly
diff --git a/src/nms-api/NMSConnectionFactory.cs b/src/nms-api/NMSConnectionFactory.cs
index 9e14ed3..06cea7c 100644
--- a/src/nms-api/NMSConnectionFactory.cs
+++ b/src/nms-api/NMSConnectionFactory.cs
@@ -340,7 +340,11 @@
Assembly executingAssembly = Assembly.GetExecutingAssembly();
try
{
- pathList.Add(Path.GetDirectoryName(executingAssembly.Location));
+ var path = Path.GetDirectoryName(executingAssembly.Location);
+ if (!string.IsNullOrEmpty(path))
+ {
+ pathList.Add(path);
+ }
}
catch (Exception ex)
{