Skip to content

Commit

Permalink
Guards against accessing already-disposed connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Best committed Jun 20, 2019
1 parent 782f11d commit 84dce37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tailor/SqlConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ protected virtual void Dispose(bool disposing)
{
if (disposing)
{
_connection.Close();
if (_connection != null)
{
_connection.Close();
}
}
}
}
Expand Down

0 comments on commit 84dce37

Please sign in to comment.