Skip to content

Commit 51f0b85

Browse files
committed
Fixed possible NullReferenceException when using PersistenceSpecifications.
1 parent c24de5a commit 51f0b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FluentNHibernate/Testing/Values/Property.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private string GetInequalityComparisonMessage(object actual)
8787
{
8888
string message;
8989

90-
string actualToPrint = actual.ToString();
90+
string actualToPrint = actual != null ? actual.ToString() : "(null)";
9191
string actualTypeToPrint = PropertyAccessor.PropertyType.FullName;
9292

9393
string valueToPrint = Value != null ? Value.ToString() : "(null)";

0 commit comments

Comments
 (0)