diff --git a/QuickLook.Common/ExtensionMethods/WindowInteropHelperExtension.cs b/QuickLook.Common/ExtensionMethods/WindowInteropHelperExtension.cs index ad42745..7a93722 100644 --- a/QuickLook.Common/ExtensionMethods/WindowInteropHelperExtension.cs +++ b/QuickLook.Common/ExtensionMethods/WindowInteropHelperExtension.cs @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using QuickLook.Common.Helpers; using System; using System.Windows.Interop; @@ -30,9 +31,10 @@ public static class WindowInteropHelperExtension { return windowInteropHelper?.EnsureHandle() ?? IntPtr.Zero; } - catch + catch (Exception e) { // Returning 0 is fine, since this error usually only occurs when the window is already closed or being disposed. + ProcessHelper.WriteLog(e.ToString()); return IntPtr.Zero; } }