Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
ULiiAn committed Jun 29, 2017
1 parent 5026f22 commit 8aa2562
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/CodeProject.ObjectPool/ObjectPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public int MaximumPoolSize
/// <param name="config"></param>
protected void StartEvictor(EvictionConfig config)
{
if (this._timer != null && config.Enable)
if (config != null && this._timer != null && config.Enable)
{
this._timer.Schedule(
() =>
Expand Down
1 change: 1 addition & 0 deletions src/CodeProject.ObjectPool/PooledObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ internal bool ValidateObject(PooledObjectValidationContext validationContext)
{
this.PooledObjectInfo.State = PooledObjectState.ValidateFail;
}
return verifyResult;
}
catch (Exception ex)
{
Expand Down

0 comments on commit 8aa2562

Please sign in to comment.