From 6f77637f504861a13164b2ae4fddfbae28953a70 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 02:29:48 +0000 Subject: [PATCH 1/2] Fix: Added null check for op before calling Unadvise --- src/Files.App/Utils/Shell/ShellFileOperations2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Files.App/Utils/Shell/ShellFileOperations2.cs b/src/Files.App/Utils/Shell/ShellFileOperations2.cs index daf610d95fc9..1584e459273b 100644 --- a/src/Files.App/Utils/Shell/ShellFileOperations2.cs +++ b/src/Files.App/Utils/Shell/ShellFileOperations2.cs @@ -576,7 +576,7 @@ protected virtual void Dispose(bool disposing) // Dispose managed state (managed objects). } - if (sink != null) + if (sink != null && op != null) // Add a null check for op { op.Unadvise(sinkCookie); } From 3e6d6fcc82876999ea6179e9ad883b291bde8c89 Mon Sep 17 00:00:00 2001 From: Yair <39923744+yaira2@users.noreply.github.com> Date: Fri, 25 Jul 2025 10:04:56 -0400 Subject: [PATCH 2/2] Update src/Files.App/Utils/Shell/ShellFileOperations2.cs Co-authored-by: hishitetsu <66369541+hishitetsu@users.noreply.github.com> Signed-off-by: Yair <39923744+yaira2@users.noreply.github.com> --- src/Files.App/Utils/Shell/ShellFileOperations2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Files.App/Utils/Shell/ShellFileOperations2.cs b/src/Files.App/Utils/Shell/ShellFileOperations2.cs index 1584e459273b..59512f57091d 100644 --- a/src/Files.App/Utils/Shell/ShellFileOperations2.cs +++ b/src/Files.App/Utils/Shell/ShellFileOperations2.cs @@ -576,7 +576,7 @@ protected virtual void Dispose(bool disposing) // Dispose managed state (managed objects). } - if (sink != null && op != null) // Add a null check for op + if (sink != null && op != null) { op.Unadvise(sinkCookie); }