Skip to content

Commit

Permalink
[AdvancedPaste]Fix NullReferenceException on Dispose (#36428)
Browse files Browse the repository at this point in the history
[AdvancedPaste] Fixed NullReferenceException on Dispose
  • Loading branch information
drawbyperpetual authored Dec 18, 2024
1 parent e77ea96 commit 799f739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ protected virtual void Dispose(bool disposing)
if (disposing)
{
EtwTrace?.Dispose();
window.Dispose();
window?.Dispose();
}

disposedValue = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ private void Dispose(bool disposing)
{
if (disposing)
{
_cancellationTokenSource.Dispose();
_watcher.Dispose();
_cancellationTokenSource?.Dispose();
_watcher?.Dispose();
}

_disposedValue = true;
Expand Down

0 comments on commit 799f739

Please sign in to comment.