Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 743dd2c

Browse files
committed
Merge pull request #289 from sjuxax/master
Don't break loop on NullReferenceException. ...
2 parents 80124db + 309ff6e commit 743dd2c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ServiceStack.OrmLite/FieldDefinition.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ public void SetValue(object onInstance, object withValue)
6262
if (this.SetValueFn == null) return;
6363

6464
var convertedValue = OrmLiteConfig.DialectProvider.ConvertDbValue(withValue, this.FieldType);
65-
SetValueFn(onInstance, convertedValue);
65+
try
66+
{
67+
SetValueFn(onInstance, convertedValue);
68+
}
69+
catch (NullReferenceException ex)
70+
{
71+
}
6672
}
6773

6874
public string GetQuotedValue(object fromInstance)

0 commit comments

Comments
 (0)