Skip to content

Commit

Permalink
Ignore null IDisposables
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jul 14, 2015
1 parent 872b471 commit 143b1a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ServiceStack.Common/DisposableExtensions.cs
Expand Up @@ -10,6 +10,9 @@ public static void Dispose(this IEnumerable<IDisposable> resources, ILog log)
{
foreach (var disposable in resources)
{
if (disposable == null)
continue;

try
{
disposable.Dispose();
Expand Down

0 comments on commit 143b1a4

Please sign in to comment.