Skip to content

Commit 5c7ec9a

Browse files
committed
Merge pull request #224 from childnodeContribArch/patch-1
NH-3540: fix NPE in Path.Combine if binPath isn't set
2 parents 889f6df + f9ce502 commit 5c7ec9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NHibernate/Logging.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private static string GetNhibernateLoggerClass()
8585
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
8686
string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath;
8787
string binPath = relativeSearchPath == null ? baseDir : Path.Combine(baseDir, relativeSearchPath);
88-
var log4NetDllPath = Path.Combine(binPath, "log4net.dll");
88+
string log4NetDllPath = binPath == null ? "log4net.dll" : Path.Combine(binPath, "log4net.dll");
8989

9090
if (File.Exists(log4NetDllPath))
9191
{
@@ -456,4 +456,4 @@ public void WarnFormat(string format, params object[] args)
456456
WarnFormatDelegate(logger, format, args);
457457
}
458458
}
459-
}
459+
}

0 commit comments

Comments
 (0)