Skip to content

Commit

Permalink
Ensure we do not dispose a nullable field
Browse files Browse the repository at this point in the history
  • Loading branch information
LordMike committed Apr 27, 2022
1 parent 66ad5b5 commit 5b9e93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TMDbLib/Rest/RestResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public string GetHeader(string name, string @default = null)
[SuppressMessage("IDisposableAnalyzers.Correctness", "IDISP007:Don't dispose injected.", Justification = "RestResponse owns the response")]
public virtual void Dispose()
{
Response.Dispose();
Response?.Dispose();
}
}

Expand Down

0 comments on commit 5b9e93e

Please sign in to comment.